Move the maxSessionAge init for SystemConfig to GerritServer
This is where the rest of the system configuration is stored, so we should initialize it there, to reduce confusion about how the default setup is obtained. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -55,10 +55,10 @@ public final class SystemConfig {
|
||||
HTTP;
|
||||
}
|
||||
|
||||
/** Construct a new, unconfigured instance. */
|
||||
public static SystemConfig create() {
|
||||
final SystemConfig r = new SystemConfig();
|
||||
r.singleton = new SystemConfig.Key();
|
||||
r.maxSessionAge = 12 * 60 * 60 /* seconds */;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@@ -211,6 +211,7 @@ public class GerritServer {
|
||||
c.accountGroups().insert(Collections.singleton(registered));
|
||||
|
||||
final SystemConfig s = SystemConfig.create();
|
||||
s.maxSessionAge = 12 * 60 * 60 /* seconds */;
|
||||
s.xsrfPrivateKey = SignedToken.generateRandomKey();
|
||||
s.accountPrivateKey = SignedToken.generateRandomKey();
|
||||
s.sshdPort = 29418;
|
||||
|
Reference in New Issue
Block a user