Improve readability of CompositePermissionProvider and CompositeTreePermission (redundant code in CompositePermissionProviderOr.getPrivileges)
@@ -73,8 +73,6 @@ final class CompositePermissionProviderOr extends CompositePermissionProvider {
Tree immutableTree = PermissionUtil.getReadOnlyTreeOrNull(tree, getImmutableRoot());
PrivilegeBits result = PrivilegeBits.getInstance();
- PrivilegeBits denied = PrivilegeBits.getInstance();
-
PrivilegeBitsProvider bitsProvider = getBitsProvider();
for (AggregatedPermissionProvider aggregatedPermissionProvider : getPermissionProviders()) {
PrivilegeBits supported = aggregatedPermissionProvider.supportedPrivileges(immutableTree, null).modifiable();
@@ -86,10 +84,6 @@ final class CompositePermissionProviderOr extends CompositePermissionProvider {
}
}
}
- // subtract all denied privileges from the result
- if (!denied.isEmpty()) {
- result.diff(denied);
- }
return getBitsProvider().getPrivilegeNames(result);
}
