| java.lang.Object org.sakaiproject.authz.impl.SakaiSecurity
All known Subclasses: org.sakaiproject.authz.impl.SakaiSecurityTest,
SakaiSecurity | abstract public class SakaiSecurity implements SecurityService(Code) | |
SakaiSecurity is a Sakai security service.
|
Method Summary | |
protected SecurityAdvisor.SecurityAdvice | adviseIsAllowed(String userId, String function, String reference) Check the advisor stack - if anyone declares ALLOWED or NOT_ALLOWED, stop and return that, else, while they PASS, keep checking.
Parameters: userId - The user id. Parameters: function - The security function. Parameters: reference - The Entity reference. | abstract protected AuthzGroupService | authzGroupService() | protected boolean | checkAuthzGroups(String userId, String function, String entityRef, Collection azgs) Check the appropriate AuthzGroups for the answer - this may be cached
Parameters: userId - The user id. Parameters: function - The security function. Parameters: entityRef - The entity reference string. | public void | clearAdvisors() | public void | destroy() Final cleanup. | protected void | dropAdvisorStack() | abstract protected EntityManager | entityManager() | protected Stack | getAdvisorStack(boolean force) | public boolean | hasAdvisors() | public void | init() Final initialization, once all dependencies are set. | public boolean | isSuperUser() | public boolean | isSuperUser(String userId) | abstract protected MemoryService | memoryService() | public SecurityAdvisor | popAdvisor() | public void | pushAdvisor(SecurityAdvisor advisor) | public void | setCacheMinutes(String time) Set the # minutes to cache a security answer. | abstract protected ThreadLocalManager | threadLocalManager() | public boolean | unlock(String lock, String resource) | public boolean | unlock(User u, String function, String entityRef) | public boolean | unlock(String userId, String function, String entityRef) | public boolean | unlock(String userId, String function, String entityRef, Collection azgs) | public List | unlockUsers(String lock, String reference) Access the List the Users who can unlock the lock for use with this resource.
Parameters: lock - The lock id string. Parameters: reference - The resource reference string. | abstract protected UserDirectoryService | userDirectoryService() |
ADVISOR_STACK | final protected static String ADVISOR_STACK(Code) | | ThreadLocalManager key for our SecurityAdvisor Stack.
|
m_cacheMinutes | protected int m_cacheMinutes(Code) | | The # minutes to cache the security answers. 0 disables the cache.
|
m_callCache | protected MultiRefCache m_callCache(Code) | | A cache of calls to the service and the results.
|
adviseIsAllowed | protected SecurityAdvisor.SecurityAdvice adviseIsAllowed(String userId, String function, String reference)(Code) | | Check the advisor stack - if anyone declares ALLOWED or NOT_ALLOWED, stop and return that, else, while they PASS, keep checking.
Parameters: userId - The user id. Parameters: function - The security function. Parameters: reference - The Entity reference. ALLOWED or NOT_ALLOWED if an advisor makes a decision, or PASS if there are no advisors or they cannot make a decision. |
authzGroupService | abstract protected AuthzGroupService authzGroupService()(Code) | | the AuthzGroupService collaborator. |
checkAuthzGroups | protected boolean checkAuthzGroups(String userId, String function, String entityRef, Collection azgs)(Code) | | Check the appropriate AuthzGroups for the answer - this may be cached
Parameters: userId - The user id. Parameters: function - The security function. Parameters: entityRef - The entity reference string. true if allowed, false if not. |
clearAdvisors | public void clearAdvisors()(Code) | | |
destroy | public void destroy()(Code) | | Final cleanup.
|
dropAdvisorStack | protected void dropAdvisorStack()(Code) | | Remove the thread-local security advisor stack
|
entityManager | abstract protected EntityManager entityManager()(Code) | | the EntityManager collaborator. |
getAdvisorStack | protected Stack getAdvisorStack(boolean force)(Code) | | Get the thread-local security advisor stack, possibly creating it
Parameters: force - if true, create if missing |
hasAdvisors | public boolean hasAdvisors()(Code) | | |
init | public void init()(Code) | | Final initialization, once all dependencies are set.
|
isSuperUser | public boolean isSuperUser()(Code) | | |
memoryService | abstract protected MemoryService memoryService()(Code) | | the MemoryService collaborator. |
setCacheMinutes | public void setCacheMinutes(String time)(Code) | | Set the # minutes to cache a security answer.
Parameters: time - The # minutes to cache a security answer (as an integer string). |
unlockUsers | public List unlockUsers(String lock, String reference)(Code) | | Access the List the Users who can unlock the lock for use with this resource.
Parameters: lock - The lock id string. Parameters: reference - The resource reference string. A List (User) of the users can unlock the lock (may be empty). |
|
|