mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for ALF-2609: CMIS ACL mapping improvements
- repository specifc reporting includes actual assigned permissions + CMIS permissions reported as indirect - CMIS format reports cmis permissions directly set for Read, Write and All only - Apache Chemistry CMIS AtomPub TCK pass - cmis-tck-ws ACL test pass git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20051 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,11 +32,19 @@ public class CMISAccessControlEntryImpl implements CMISAccessControlEntry
|
||||
|
||||
private int position;
|
||||
|
||||
/*package*/ CMISAccessControlEntryImpl(String principalId, String permission, int position)
|
||||
private boolean direct;
|
||||
|
||||
/*package*/ CMISAccessControlEntryImpl(String principalId, String permission, int position, boolean direct)
|
||||
{
|
||||
this.principalId = principalId;
|
||||
this.permission = permission;
|
||||
this.position = position;
|
||||
this.direct = direct;
|
||||
}
|
||||
|
||||
/*package*/ CMISAccessControlEntryImpl(String principalId, String permission, int position)
|
||||
{
|
||||
this(principalId, permission, position, position == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,7 +64,7 @@ public class CMISAccessControlEntryImpl implements CMISAccessControlEntry
|
||||
*/
|
||||
public boolean getDirect()
|
||||
{
|
||||
return position == 0;
|
||||
return direct;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -83,23 +91,18 @@ public class CMISAccessControlEntryImpl implements CMISAccessControlEntry
|
||||
return position;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + (direct ? 1231 : 1237);
|
||||
result = prime * result + ((permission == null) ? 0 : permission.hashCode());
|
||||
result = prime * result + position;
|
||||
result = prime * result + ((principalId == null) ? 0 : principalId.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
@@ -109,7 +112,9 @@ public class CMISAccessControlEntryImpl implements CMISAccessControlEntry
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
final CMISAccessControlEntryImpl other = (CMISAccessControlEntryImpl) obj;
|
||||
CMISAccessControlEntryImpl other = (CMISAccessControlEntryImpl) obj;
|
||||
if (direct != other.direct)
|
||||
return false;
|
||||
if (permission == null)
|
||||
{
|
||||
if (other.permission != null)
|
||||
|
Reference in New Issue
Block a user