use of org.bimserver.database.actions.ChangeUserTypeDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method changeUserType.
@Override
public void changeUserType(Long uoid, SUserType userType) throws ServerException, UserException {
requireAdminAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Void> action = new ChangeUserTypeDatabaseAction(getBimServer(), session, getInternalAccessMethod(), getAuthorization(), uoid, userType);
session.executeAndCommitAction(action);
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
}
Aggregations