Loading...

vastorbit.has_privileges

vastorbit.has_privileges(object_name: str, object_schema: str, privileges: list, raise_error: bool = False) bool

Checks if the user has all the privileges on the object_schema.object_name object.

Parameters:
  • object_name (str) – The object name.

  • object_schema (str) – Schema name.

  • privileges (list) – The list of privileges.

  • raise_error (bool, optional) – It raises an error if not all privileges are granted.

Returns:

True if the user has been granted the list of privileges on the object. False otherwise.

Return type:

bool

Examples

See also

current_session() : current DB session.
username() : current DB username.