| |
---|
| | ldap.keystore.foreach(x => props.setProperty(LdapKeystore, x)) |
---|
| | } |
---|
| | } |
---|
| | props.setProperty(SkinName, settings.skinName.toString) |
---|
| | props.setProperty(Debug, settings.debug.toString) |
---|
| | using(new java.io.FileOutputStream(GitBucketConf)){ out => |
---|
| | props.store(out, null) |
---|
| | } |
---|
| | } |
---|
| |
---|
| | getOptionValue(props, LdapKeystore, None))) |
---|
| | } else { |
---|
| | None |
---|
| | }, |
---|
| | getValue(props, SkinName, "skin-blue"), |
---|
| | getValue(props, Debug, false) |
---|
| | getValue(props, SkinName, "skin-blue") |
---|
| | ) |
---|
| | } |
---|
| | } |
---|
| | |
---|
| |
---|
| | useSMTP: Boolean, |
---|
| | smtp: Option[Smtp], |
---|
| | ldapAuthentication: Boolean, |
---|
| | ldap: Option[Ldap], |
---|
| | skinName: String, |
---|
| | debug: Boolean){ |
---|
| | skinName: String){ |
---|
| | def baseUrl(request: HttpServletRequest): String = baseUrl.fold(request.baseUrl)(_.stripSuffix("/")) |
---|
| | |
---|
| | def sshAddress:Option[SshAddress] = |
---|
| | for { |
---|
| |
---|
| | private val LdapTls = "ldap.tls" |
---|
| | private val LdapSsl = "ldap.ssl" |
---|
| | private val LdapKeystore = "ldap.keystore" |
---|
| | private val SkinName = "skinName" |
---|
| | private val Debug = "debug" |
---|
| | |
---|
| | private def getValue[A: ClassTag](props: java.util.Properties, key: String, default: A): A = { |
---|
| | getSystemProperty(key).getOrElse(getEnvironmentVariable(key).getOrElse { |
---|
| | defining(props.getProperty(key)){ value => |
---|
| |
---|
| | |