use of org.bimserver.database.actions.UserHasRightsDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method userHasRights.
@Override
public Boolean userHasRights(Long poid) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Boolean> action = new UserHasRightsDatabaseAction(session, getInternalAccessMethod(), getCurrentUser(session).getOid(), getAuthorization(), poid);
return session.executeAndCommitAction(action);
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations