mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
RBAC: Remove user permissions in org when user is removed (#53782)
* RBAC: Add orgID to DeleteUserPermissions * RBAC: Refactor query to delete all permissions in specified org, 0 deletes all permissions * Delete user permission in org when user is removed * Remove call to delete permissions in frontend * Remove user permissions if removed orgs is detected during oauth sync Co-authored-by: Jo <joao.guerreiro@grafana.com>
This commit is contained in:
@@ -158,16 +158,8 @@ class UnThemedOrgRow extends PureComponent<OrgRowProps> {
|
||||
}
|
||||
|
||||
onOrgRemove = async () => {
|
||||
const { org, user } = this.props;
|
||||
const { org } = this.props;
|
||||
this.props.onOrgRemove(org.orgId);
|
||||
if (contextSrv.licensedAccessControlEnabled()) {
|
||||
if (
|
||||
contextSrv.hasPermission(AccessControlAction.ActionUserRolesRemove) &&
|
||||
contextSrv.hasPermission(AccessControlAction.ActionUserRolesAdd)
|
||||
) {
|
||||
user && (await updateUserRoles([], user.id, org.orgId));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onChangeRoleClick = () => {
|
||||
|
||||
Reference in New Issue
Block a user