org.eclipse.emf.emfstore.internal.client.accesscontrol
Class AccessControlHelper

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.accesscontrol.AccessControlHelper

public class AccessControlHelper
extends Object

Helper class for access control checks.

Author:
koegel

Constructor Summary
AccessControlHelper(Usersession usersession)
          Default constructor.
 
Method Summary
 void checkProjectAdminAccess()
          Check project administrator access for the given project.
 void checkProjectAdminAccess(ProjectId projectId)
          Check project administrator access for the given project.
 void checkReadAccess(ProjectId projectId)
          Check if user has read access to given project id.
 void checkServerAdminAccess()
          Check the server admin access.
 void checkWriteAccess(ProjectId projectId)
          Check write access for the given project.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessControlHelper

public AccessControlHelper(Usersession usersession)
Default constructor.

Parameters:
usersession - the user session that needs to be checked
Method Detail

checkReadAccess

public void checkReadAccess(ProjectId projectId)
                     throws AccessControlException
Check if user has read access to given project id.

Parameters:
projectId - the project id
Throws:
AccessControlException - if access is not permitted.

checkWriteAccess

public void checkWriteAccess(ProjectId projectId)
                      throws AccessControlException
Check write access for the given project.

Parameters:
projectId - the ID of a project
Throws:
AccessControlException - if access is denied

checkProjectAdminAccess

public void checkProjectAdminAccess()
                             throws AccessControlException
Check project administrator access for the given project.

Throws:
AccessControlException - if access is denied.

checkProjectAdminAccess

public void checkProjectAdminAccess(ProjectId projectId)
                             throws AccessControlException
Check project administrator access for the given project.

Parameters:
projectId - the project id
Throws:
AccessControlException - if access is denied.

checkServerAdminAccess

public void checkServerAdminAccess()
                            throws AccessControlException
Check the server admin access.

Throws:
AccessControlException - if access is denied.


Copyright © 2015. All Rights Reserved.