sym.sdk.integrations.onelogin.is_user_in_role¶
- sym.sdk.integrations.onelogin.is_user_in_role(user: sym.sdk.user.User, *, role_id: int) bool ¶
Checks if the provided
User
is a member of the OneLogin role specified.The OneLogin role’s ID must be given, and the function will check that the role exists and is accessible.
- Parameters
user – The
User
to check role membership for.role_id – The ID of the OneLogin role.
- Returns
True if the user is a member of the specified OneLogin role, False otherwise.
- Raises
MissingArgument – If the role_id is not provided.
OneLoginError – If the role does not exist or is not accessible, or if no
User
is provided.