|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.emfstore.internal.server.accesscontrol.DefaultESAuthorizationService
public class DefaultESAuthorizationService
Default implementation of the ESAuthorizationService
.
Constructor Summary | |
---|---|
DefaultESAuthorizationService()
|
Method Summary | |
---|---|
void |
checkAccess(ESMethodInvocation op)
Checks whether a given operation may be executed. |
boolean |
checkProjectAdminAccess(ESSessionId sessionId,
ESGlobalProjectId globalProjectId)
Check if the session is valid for admin access to the given project. |
boolean |
checkProjectAdminAccess(ESSessionId sessionId,
ESGlobalProjectId globalProjectId,
ESProjectAdminPrivileges privileg)
Check if the session is valid for admin access to the given project. |
boolean |
checkProjectAdminAccessForOrgUnit(ESSessionId sessionId,
ESOrgUnitId orgUnitId)
Check if the session is valid for admin access to the given organizational unit. |
boolean |
checkProjectAdminAccessForOrgUnit(ESSessionId sessionId,
ESOrgUnitId orgUnitId,
Set<ESGlobalProjectId> projectIds)
Check if the session is valid for admin access to the given organizational unit. |
void |
checkReadAccess(ESSessionId sessionId,
ESGlobalProjectId globalProjectId,
Set<org.eclipse.emf.ecore.EObject> modelElements)
Check if the session may read the given model elements in the project. |
void |
checkServerAdminAccess(ESSessionId sessionId)
Check if the session is valid for server admin access. |
void |
checkWriteAccess(ESSessionId sessionId,
ESGlobalProjectId globalProjectId,
Set<org.eclipse.emf.ecore.EObject> modelElements)
Check if the session may write the given model elements in the project. |
void |
init(ESSessions sessions,
ESOrgUnitResolver orgUnitResolverServive,
ESOrgUnitProvider orgUnitProvider)
Initializes this service. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultESAuthorizationService()
Method Detail |
---|
public boolean checkProjectAdminAccess(ESSessionId sessionId, ESGlobalProjectId globalProjectId) throws AccessControlException
checkProjectAdminAccess
in interface ESAuthorizationService
sessionId
- the session idglobalProjectId
- the project id. May be null
true
, if permission is granted via the server admin role, false
otherwise
AccessControlException
- if the session is invalid for admin accessESAuthorizationService.checkProjectAdminAccess(org.eclipse.emf.emfstore.server.model.ESSessionId,
org.eclipse.emf.emfstore.server.model.ESGlobalProjectId)
public void checkServerAdminAccess(ESSessionId sessionId) throws AccessControlException
checkServerAdminAccess
in interface ESAuthorizationService
sessionId
- the session id
AccessControlException
- if the session is invalid for server admin accessESAuthorizationService.checkServerAdminAccess(org.eclipse.emf.emfstore.server.model.ESSessionId)
public boolean checkProjectAdminAccessForOrgUnit(ESSessionId sessionId, ESOrgUnitId orgUnitId) throws AccessControlException
checkProjectAdminAccessForOrgUnit
in interface ESAuthorizationService
sessionId
- the session idorgUnitId
- the ID of an organizational unit
true
, if permission is granted via the server admin role, false
otherwise
AccessControlException
- if the session is invalid for admin accessESAuthorizationService.checkProjectAdminAccessForOrgUnit(org.eclipse.emf.emfstore.server.model.ESSessionId,
org.eclipse.emf.emfstore.server.model.ESOrgUnitId)
public boolean checkProjectAdminAccessForOrgUnit(ESSessionId sessionId, ESOrgUnitId orgUnitId, Set<ESGlobalProjectId> projectIds) throws AccessControlException
checkProjectAdminAccessForOrgUnit
in interface ESAuthorizationService
sessionId
- the session idorgUnitId
- the ID of an organizational unitprojectIds
- the set of ESGlobalProjectId
s for which to check access for
true
, if permission is granted via the server admin role, false
otherwise
AccessControlException
- if the session is invalid for admin accessESAuthorizationService.checkProjectAdminAccessForOrgUnit(org.eclipse.emf.emfstore.server.model.ESSessionId,
org.eclipse.emf.emfstore.server.model.ESOrgUnitId, java.util.Set)
public boolean checkProjectAdminAccess(ESSessionId sessionId, ESGlobalProjectId globalProjectId, ESProjectAdminPrivileges privileg) throws AccessControlException
checkProjectAdminAccess
in interface ESAuthorizationService
sessionId
- the session idglobalProjectId
- the project id. May be null
privileg
- the ESProjectAdminPrivileges
to be checked
true
, if permission is granted via the server admin role, false
otherwise
AccessControlException
- if the session is invalid for admin accessESAuthorizationService.checkProjectAdminAccess(org.eclipse.emf.emfstore.server.model.ESSessionId,
org.eclipse.emf.emfstore.server.model.ESGlobalProjectId,
org.eclipse.emf.emfstore.server.auth.ESProjectAdminPrivileges)
public void checkReadAccess(ESSessionId sessionId, ESGlobalProjectId globalProjectId, Set<org.eclipse.emf.ecore.EObject> modelElements) throws AccessControlException
checkReadAccess
in interface ESAuthorizationService
sessionId
- session idglobalProjectId
- project idmodelElements
- a set of model elements
AccessControlException
- if the session may not read any of the model elementsESAuthorizationService.checkReadAccess(org.eclipse.emf.emfstore.server.model.ESSessionId,
org.eclipse.emf.emfstore.server.model.ESGlobalProjectId, java.util.Set)
public void checkWriteAccess(ESSessionId sessionId, ESGlobalProjectId globalProjectId, Set<org.eclipse.emf.ecore.EObject> modelElements) throws AccessControlException
checkWriteAccess
in interface ESAuthorizationService
sessionId
- session idglobalProjectId
- project idmodelElements
- a set of model elements
AccessControlException
- if the session may not write any of the model elementsESAuthorizationService.checkWriteAccess(org.eclipse.emf.emfstore.server.model.ESSessionId,
org.eclipse.emf.emfstore.server.model.ESGlobalProjectId, java.util.Set)
public void checkAccess(ESMethodInvocation op) throws AccessControlException
checkAccess
in interface ESAuthorizationService
op
- the method the user intends to execute
AccessControlException
- in case access is deniedESAuthorizationService.checkAccess(org.eclipse.emf.emfstore.server.auth.ESMethodInvocation)
public void init(ESSessions sessions, ESOrgUnitResolver orgUnitResolverServive, ESOrgUnitProvider orgUnitProvider)
init
in interface ESAuthorizationService
sessions
- the ESSessions
object for session handlingorgUnitResolverServive
- the ESOrgUnitResolver
for resolving organizational unitsorgUnitProvider
- the ESOrgUnitProvider
for obtaining organizational unitsESAuthorizationService.init(org.eclipse.emf.emfstore.server.auth.ESSessions,
org.eclipse.emf.emfstore.server.auth.ESOrgUnitResolver,
org.eclipse.emf.emfstore.server.model.ESOrgUnitProvider)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |