Checkpoint of light weight ACLs.

This is a fairly brute force strategy that allows permissions evalutations
with essentially no db access. It does a number of 'bad' things and I may
rip it out completely.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6788 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-09-14 12:39:07 +00:00
parent d9590d3677
commit fb81fb4470
26 changed files with 1424 additions and 180 deletions

View File

@@ -31,13 +31,19 @@ import java.util.Set;
* Interface for a registry of capabilities.
* @author britt
*/
public interface CapabilityRegistry
public interface AuthorityCapabilityRegistry
{
/**
* Get all known capabilities.
* @return A list of all the capabilities.
*/
public Set<String> getAll();
public Set<String> getAllCapabilities();
/**
* Get all authorities know to the system.
* @return
*/
public Set<String> getAllAuthorities();
/**
* Get the integer id corresponding to the given capability.
@@ -59,8 +65,50 @@ public interface CapabilityRegistry
public void addCapability(String capability);
/**
* Remove a capability from the system.
* @param capability
* Get the id for an authority.
* @param authority
* @return The id for the authority.
*/
public void removeCapability(String capability);
public int getAuthorityID(String authority);
/**
* Get the name from an authority id.
* @param id The authority id.
* @return The authority name.
*/
public String getAuthorityName(int id);
/**
* Add a new authority.
* @param authority The authority name.
* @param parent The parent authority. May be null.
*/
public void addAuthority(String authority, String parent);
/**
* Remove an authority completely from the system.
* @param authority The authority to move.
*/
public void removeAuthority(String authority);
/**
* Remove a containment relationship.
* @param parent The parent.
* @param child The child.
*/
public void removeAuthorityChild(String parent, String child);
/**
* Get all authorities which are contained directly or transitively by the given authority.
* @param authority The authority to check.
* @return The contained authorities.
*/
public Set<String> getContainedAuthorities(String authority);
/**
* Get all authorities which directly or indirectly contain the given authority.
* @param authority The authority to check.
* @return The container authorities.
*/
public Set<String> getContainerAuthorities(String authority);
}