drop_role

The drop_role operator deletes a specified role. Available only in the Enterprise Edition.

SciDB security mode must be correctly configured before this or any security operator can be used.  See the Security section of the SciDB Administration Guide.

 Synopsis

drop_role('roleName')

Inputs

  • roleName - The string literal role name.

Summary

  • The drop_role operator deletes a specified role.
  • Requires operator privilege.
  • Requires the scidbadmin user to drop the special roles operator or admin.

Example

Here the scidbadmin user tries to remove the role uploader but cannot because it is not empty.  After removing the lone role member, scidbadmin can successfully remove the role.

AFL% show_user();
{i} name
{0} 'scidbadmin'
AFL% drop_role('uploader');
SystemException in file: src/namespaces/DropRole.cpp function: operator() line: 63
Error id: libnamespaces::SCIDB_SE_UDO::NAMESPACE_E_ROLE_NOT_EMPTY
Error description: Error in user defined object. Role not empty name='uploader'.
AFL% show_users_in_role('uploader');
{No} user
{0} 'data-generator-5000'
AFL% drop_user_from_role('data-generator-5000', 'uploader');
Query was executed successfully
AFL% show_users_in_role('uploader');
{No} user
AFL% drop_role('uploader');
Query was executed successfully
AFL%