public class DefaultESAuthorizationService extends Object implements ESAuthorizationService
ESAuthorizationService.| Constructor and Description |
|---|
DefaultESAuthorizationService() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public boolean checkProjectAdminAccess(ESSessionId sessionId, ESGlobalProjectId globalProjectId) throws AccessControlException
checkProjectAdminAccess in interface ESAuthorizationServicesessionId - the session idglobalProjectId - the project id. May be nulltrue, if permission is granted via the server admin role, false otherwiseAccessControlException - 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 ESAuthorizationServicesessionId - the session idAccessControlException - 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 ESAuthorizationServicesessionId - the session idorgUnitId - the ID of an organizational unittrue, if permission is granted via the server admin role, false otherwiseAccessControlException - 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 ESAuthorizationServicesessionId - the session idorgUnitId - the ID of an organizational unitprojectIds - the set of ESGlobalProjectIds for which to check access fortrue, if permission is granted via the server admin role, false otherwiseAccessControlException - 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 ESAuthorizationServicesessionId - the session idglobalProjectId - the project id. May be nullprivileg - the ESProjectAdminPrivileges to be checkedtrue, if permission is granted via the server admin role, false otherwiseAccessControlException - 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 ESAuthorizationServicesessionId - session idglobalProjectId - project idmodelElements - a set of model elementsAccessControlException - 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 ESAuthorizationServicesessionId - session idglobalProjectId - project idmodelElements - a set of model elementsAccessControlException - 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 ESAuthorizationServiceop - the method the user intends to executeAccessControlException - 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 ESAuthorizationServicesessions - 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)Copyright © 2017. All rights reserved.