mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Guest fixes
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2173 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<cm:homeFolder>/${spaces.company_home.childname}</cm:homeFolder>
|
<cm:homeFolder>/${spaces.company_home.childname}</cm:homeFolder>
|
||||||
</cm:person>
|
</cm:person>
|
||||||
<cm:person view:childName="cm:person">
|
<cm:person view:childName="cm:person">
|
||||||
<cm:userName>Guest</cm:userName>
|
<cm:userName>guest</cm:userName>
|
||||||
<cm:firstName>Guest</cm:firstName>
|
<cm:firstName>Guest</cm:firstName>
|
||||||
<cm:lastName></cm:lastName>
|
<cm:lastName></cm:lastName>
|
||||||
<cm:email></cm:email>
|
<cm:email></cm:email>
|
||||||
|
@@ -425,7 +425,6 @@ public class PermissionServiceImpl implements PermissionServiceSPI, Initializing
|
|||||||
// TODO: Refactor and use the authentication service for this.
|
// TODO: Refactor and use the authentication service for this.
|
||||||
User user = (User) auth.getPrincipal();
|
User user = (User) auth.getPrincipal();
|
||||||
auths.add(user.getUsername());
|
auths.add(user.getUsername());
|
||||||
auths.add(getAllAuthorities());
|
|
||||||
for (GrantedAuthority authority : auth.getAuthorities())
|
for (GrantedAuthority authority : auth.getAuthorities())
|
||||||
{
|
{
|
||||||
auths.add(authority.getAuthority());
|
auths.add(authority.getAuthority());
|
||||||
|
@@ -63,6 +63,51 @@ public class PersonTest extends BaseSpringTest
|
|||||||
{
|
{
|
||||||
super.onTearDownInTransaction();
|
super.onTearDownInTransaction();
|
||||||
flushAndClear();
|
flushAndClear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void xtestPerformance()
|
||||||
|
{
|
||||||
|
personService.setCreateMissingPeople(false);
|
||||||
|
|
||||||
|
personService.createPerson(createDefaultProperties("derek", "Derek", "Hulley", "dh@dh",
|
||||||
|
"alfresco", rootNodeRef));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
long create = 0;
|
||||||
|
long count = 0;
|
||||||
|
|
||||||
|
long start;
|
||||||
|
long end;
|
||||||
|
|
||||||
|
for(int i = 0; i < 10000; i++)
|
||||||
|
{
|
||||||
|
String id = "TestUser-"+i;
|
||||||
|
start = System.nanoTime();
|
||||||
|
personService.createPerson(createDefaultProperties(id, id, id, id,
|
||||||
|
id, rootNodeRef));
|
||||||
|
end = System.nanoTime();
|
||||||
|
create += (end - start);
|
||||||
|
|
||||||
|
if((i > 0) && (i % 100 == 0))
|
||||||
|
{
|
||||||
|
System.out.println("Count = "+i);
|
||||||
|
System.out.println("Average create : "+(create/i/1000000.0f));
|
||||||
|
start = System.nanoTime();
|
||||||
|
personService.personExists(id);
|
||||||
|
end = System.nanoTime();
|
||||||
|
System.out.println("Exists : "+((end-start)/1000000.0f));
|
||||||
|
|
||||||
|
start = System.nanoTime();
|
||||||
|
int size = personService.getAllPeople().size();
|
||||||
|
end = System.nanoTime();
|
||||||
|
System.out.println("Size ("+size+") : "+((end-start)/1000000.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCreateMissingPeople1()
|
public void testCreateMissingPeople1()
|
||||||
|
@@ -219,7 +219,7 @@ public enum AuthorityType
|
|||||||
{
|
{
|
||||||
authorityType = AuthorityType.OWNER;
|
authorityType = AuthorityType.OWNER;
|
||||||
}
|
}
|
||||||
else if (authority.equals(PermissionService.GUEST))
|
else if (authority.equalsIgnoreCase(PermissionService.GUEST))
|
||||||
{
|
{
|
||||||
authorityType = AuthorityType.GUEST;
|
authorityType = AuthorityType.GUEST;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user