mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.0 to HEAD
5448: (From V1.4) 5281 (V1.4): Patches not executed in read-only mode 5284 (V1.4): Integrity messages 5308 (V1.4): Category selector performance 5331 (V1.4): Category performance 5402 (V1.4): AR-1315 5410 (V1.4): 5417 (V1.4): Upgrade script performance 5435 (V1.4): Lucene test text encoding git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5482 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -93,6 +93,27 @@ public class PermissionServiceTest extends AbstractPermissionTest
|
||||
"andy", AccessStatus.ALLOWED);
|
||||
}
|
||||
|
||||
public void testDefaultModelPermissions()
|
||||
{
|
||||
runAs("admin");
|
||||
|
||||
NodeRef n1 = nodeService.createNode(rootNodeRef, ContentModel.ASSOC_CHILDREN,
|
||||
QName.createQName("{namespace}one"), ContentModel.TYPE_FOLDER).getChildRef();
|
||||
|
||||
runAs("andy");
|
||||
assertTrue(permissionService.hasPermission(n1, getPermission(PermissionService.CONTRIBUTOR)) == AccessStatus.DENIED);
|
||||
|
||||
runAs("admin");
|
||||
|
||||
permissionService.setPermission(new SimplePermissionEntry(n1, getPermission(PermissionService.CONTRIBUTOR),
|
||||
"andy", AccessStatus.ALLOWED));
|
||||
|
||||
|
||||
runAs("andy");
|
||||
assertTrue(permissionService.hasPermission(n1, getPermission(PermissionService.CONTRIBUTOR)) == AccessStatus.ALLOWED);
|
||||
|
||||
}
|
||||
|
||||
public void testSystemUserPermissions()
|
||||
{
|
||||
AuthenticationUtil.setSystemUserAsCurrentUser();
|
||||
@@ -1883,6 +1904,8 @@ public class PermissionServiceTest extends AbstractPermissionTest
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: Test permissions on missing nodes
|
||||
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ public class PermissionModelTest extends AbstractPermissionTest
|
||||
Set<PermissionReference> grantees = permissionModelDAO.getGranteePermissions(new SimplePermissionReference(QName.createQName("cm", "cmobject",
|
||||
namespacePrefixResolver), "Contributor"));
|
||||
|
||||
assertEquals(17, grantees.size());
|
||||
assertEquals(14, grantees.size());
|
||||
}
|
||||
|
||||
public void testIncludePermissionGroups3()
|
||||
|
Reference in New Issue
Block a user