this.acContext = securityProvider.getAccessControlConfiguration().getContext();
if (principals.contains(SystemPrincipal.INSTANCE) || isAdmin(principals)) {
compiledPermissions = AllPermissions.getInstance();
} else {
String relativePath = PERMISSIONS_STORE_PATH + '/' + workspaceName;
<BUG>ReadOnlyTree rootTree = ReadOnlyTree.createFromRoot(root);
ReadOnlyTree permissionsTree = getPermissionsRoot(rootTree, relativePath);</BUG>
if (permissionsTree == null) {
compiledPermissions = NoPermissions.getInstance();
<BUG>} else {
compiledPermissions = new CompiledPermissionImpl(permissionsTree, principals);
</BUG>
}

this.acContext = securityProvider.getAccessControlConfiguration().getContext();
if (principals.contains(SystemPrincipal.INSTANCE) || isAdmin(principals)) {
compiledPermissions = AllPermissions.getInstance();
} else {
String relativePath = PERMISSIONS_STORE_PATH + '/' + workspaceName;
ReadOnlyTree rootTree = this.root.getTree("/");
ReadOnlyTree permissionsTree = getPermissionsRoot(rootTree, relativePath);
if (permissionsTree == null) {
compiledPermissions = NoPermissions.getInstance();
} else {
PrivilegeDefinitionStore privilegeStore = new PrivilegeDefinitionStore(this.root);
compiledPermissions = new CompiledPermissionImpl(principals, privilegeStore, permissionsTree);
