public class UserChecker extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ROLE_ADMINISTRATOR |
static String |
ROLE_USER |
Constructor and Description |
---|
UserChecker(ServiceContext sc,
DaoContext dc,
String gridId,
UserDao userDao,
ServiceDao serviceDao) |
Modifier and Type | Method and Description |
---|---|
void |
checkAuthorized() |
void |
checkAuthUserAdmin() |
void |
checkAuthUserEquals(String userId) |
void |
checkAuthUserExists() |
void |
checkAuthUserIsParent(String childUserId) |
void |
checkAuthUserIsResourceOwner(String resourceId) |
void |
checkAuthUserIsServiceOwner(String serviceId) |
static UserChecker |
get(AbstractLangridService service) |
DaoContext |
getDaoContext() |
String |
getGridId() |
User |
getUser() |
String |
getUserId() |
boolean |
isAuthUserAdmin() |
public static final String ROLE_ADMINISTRATOR
public static final String ROLE_USER
public UserChecker(ServiceContext sc, DaoContext dc, String gridId, UserDao userDao, ServiceDao serviceDao)
public DaoContext getDaoContext()
public String getGridId()
public String getUserId()
public User getUser() throws DaoException, UserNotFoundException
DaoException
UserNotFoundException
public void checkAuthorized() throws NoAccessPermissionException
NoAccessPermissionException
public boolean isAuthUserAdmin() throws ServiceConfigurationException
ServiceConfigurationException
public void checkAuthUserAdmin() throws NoAccessPermissionException, ServiceConfigurationException
public void checkAuthUserEquals(String userId) throws NoAccessPermissionException
NoAccessPermissionException
public void checkAuthUserExists() throws NoAccessPermissionException, ServiceConfigurationException
public void checkAuthUserIsServiceOwner(String serviceId) throws NoAccessPermissionException, ServiceConfigurationException, UserNotFoundException, ServiceNotFoundException
public void checkAuthUserIsResourceOwner(String resourceId) throws NoAccessPermissionException, ServiceConfigurationException, UserNotFoundException
public void checkAuthUserIsParent(String childUserId) throws NoAccessPermissionException, ServiceConfigurationException, UserNotFoundException
public static UserChecker get(AbstractLangridService service) throws DaoException
DaoException