Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Only root user can grant & revoke privileges.


3、List grants for specific a user/role and resource


Code Block
languagecpp
func UserGrantListPrincipalGrantList(principalName string, principalType string, resourceType string, resourceName string) []UserGrantPrincipalGrant


Output structure:

PrincipalTypePrivilege
PrincipalNamePrincipalTypePrivilegeResourceTypeResourceNamePrincipalName
AliceUSERINSERTCollectiontbl_1AliceUserINSERT

Users can only query the grants for himself. And only root user can query grants for a role.

...