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