summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-04 15:34:32 +0200
committerSimon Rettberg2015-08-04 15:34:32 +0200
commitf976fcd147f5426f41f7adffd233aad35d3a5d2e (patch)
tree31e90a3f3146c7182471f99d56d63c524d78562c /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java
parent[server] Forgot one occurence of version.isenabled in an SQL query (diff)
downloadtutor-module-f976fcd147f5426f41f7adffd233aad35d3a5d2e.tar.gz
tutor-module-f976fcd147f5426f41f7adffd233aad35d3a5d2e.tar.xz
tutor-module-f976fcd147f5426f41f7adffd233aad35d3a5d2e.zip
[client] getPageSize() -> getConfiguration()
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/ServerHandler.java21
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);
}