...
Only root user can grant & revoke privileges.
3、List grants for a user/role
Code Block | ||
---|---|---|
| ||
func UserGrantListPrincipalGrantList(principalName string, principalType string, resourceType string, resourceName string) []UserGrantPrincipalGrant |
Output structure:
PrincipalName | UsernamePrincipalType | Privilege | ResourceType | ResourceName |
---|---|---|---|---|
Alice | USER | INSERT | Collection | tbl_1 |
Users can only query the grants for himself. And only root user can query grants for a role.
...