Merge pull request #4380 from patriot1burke/master

KEYCLOAK-5268
This commit is contained in:
Bill Burke 2017-08-10 10:45:13 -04:00 committed by GitHub
commit 4df7fd644d

View file

@ -185,9 +185,13 @@ class GroupPermissions implements GroupPermissionEvaluator, GroupPermissionManag
authz.getStoreFactory().getPolicyStore().delete(manageMembersPermission.getId());
}
Policy viewMembersPermission = viewMembersPermission(group);
if (manageMembersPermission == null) {
if (viewMembersPermission == null) {
authz.getStoreFactory().getPolicyStore().delete(viewMembersPermission.getId());
}
Policy manageMembershipPermission = manageMembershipPermission(group);
if (manageMembershipPermission != null) {
authz.getStoreFactory().getPolicyStore().delete(manageMembershipPermission.getId());
}
Resource resource = groupResource(group);
if (resource != null) authz.getStoreFactory().getResourceStore().delete(resource.getId());
}