1 package org.openslx.imagemaster.util;
3 import java.sql.SQLException;
5 import org.
openslx.bwlp.thrift.iface.AuthorizationError;
7 import org.
openslx.bwlp.thrift.iface.TAuthorizationException;
8 import org.
openslx.bwlp.thrift.iface.TNotFoundException;
23 for ( UserInfo u : user ) {
28 }
catch ( SQLException | TNotFoundException e ) {
50 }
catch ( TNotFoundException | SQLException e ) {
55 public static void assertTutor( UserInfo userInfo )
throws TAuthorizationException
57 if ( userInfo == null || userInfo.role != Role.TUTOR ) {
58 throw new TAuthorizationException( AuthorizationError.NO_PERMISSION,
"Permission denied!" );
Represents a user that can login against the masterserver.
static UserInfo getFirstPublishingUserOrDummy(UserInfo...user)
Given a list of users, return the first one that isn't anonymous, which means they opted in for globa...
static UserInfo getUserInfo(final String login)
static void assertTutor(UserInfo userInfo)
static UserInfo getFirstPublishingUser(UserInfo...user)
Given a list of users, return the first one that isn't anonymous, which means they opted in for globa...
Some utilities to make our lives easier.
static boolean isEmpty(String str)