diff options
Diffstat (limited to 'dozentenmodulserver')
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java index b835ded9..20df580d 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java @@ -32,6 +32,7 @@ import org.openslx.bwlp.thrift.iface.LectureSummary; import org.openslx.bwlp.thrift.iface.LectureWrite; import org.openslx.bwlp.thrift.iface.OperatingSystem; import org.openslx.bwlp.thrift.iface.Organization; +import org.openslx.bwlp.thrift.iface.SatelliteConfig; import org.openslx.bwlp.thrift.iface.SatelliteServer; import org.openslx.bwlp.thrift.iface.ShareMode; import org.openslx.bwlp.thrift.iface.TAuthorizationException; @@ -52,14 +53,25 @@ public class ServerHandler implements SatelliteServer.Iface { private static final FileServer fileServer = FileServer.instance(); + private static final SatelliteConfig satConfig; + + static { + satConfig = new SatelliteConfig(); + satConfig.setDefaultImagePermissions(new ImagePermissions(true, true, false, false)); + satConfig.setDefaultLecturePermissions(new LecturePermissions(false, false)); + satConfig.setMaxImageValidityDays(200); + satConfig.setMaxLectureValidityDays(100); + satConfig.setPageSize(Paginator.PER_PAGE); + } + @Override public long getVersion() { return Version.VERSION; } @Override - public int getPageSize() throws TException { - return Paginator.PER_PAGE; + public SatelliteConfig getConfiguration() { + return satConfig; } /* @@ -133,6 +145,11 @@ public class ServerHandler implements SatelliteServer.Iface { } @Override + public UserInfo whoami(String userToken) throws TAuthorizationException { + return SessionManager.getOrFail(userToken); + } + + @Override public void invalidateSession(String userToken) { SessionManager.remove(userToken); } |