Access control: Fix org user removal for OSS users (#52473)

* allow setting team managed permissions for service accounts

* Revert "allow setting team managed permissions for service accounts"

This reverts commit 7598626397.

* fix org user removal for OSS

* remove comment
pull/51496/head^2
Ieva 3 years ago committed by GitHub
parent 2538fca53a
commit ba76be174f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      public/app/features/admin/UserOrgs.tsx

@ -164,8 +164,12 @@ class UnThemedOrgRow extends PureComponent<OrgRowProps> {
onOrgRemove = async () => {
const { org, user } = this.props;
user && (await updateUserRoles([], user.id, org.orgId));
this.props.onOrgRemove(org.orgId);
if (contextSrv.licensedAccessControlEnabled()) {
if (contextSrv.hasPermission(AccessControlAction.OrgUsersRemove)) {
user && (await updateUserRoles([], user.id, org.orgId));
}
}
};
onChangeRoleClick = () => {

Loading…
Cancel
Save