import { RegExpUtility } from "../../browser/text/RegExpUtitlity"; import { Files } from "../files/Files"; export class UserManagementServerSettings { // Server settings url:string; port:number = 8084; corsURLs:string[] = []; isDebugMode:boolean = false; httpsKeyPath:string; httpsCertPath:string; emailKey:string; // Paths rootPath:string; userDBPath:string; rolesPath:string; // Apps appsPath:string; userApps:string[]; // Geo-Lite Lib geoLocationPath:string; geoAccountID:string; geoLicenseKey:string; // Email emailFrom:string; // User settings maxLogins:number = 5; signUpConfirmationURL:string; changePasswordURL:string; static makeAllPathsAbsolute( settings:UserManagementServerSettings ) { settings.userDBPath = this._makePathAbsolute( settings.userDBPath, settings.rootPath ); settings.rolesPath = this._makePathAbsolute( settings.rolesPath, settings.rootPath ); settings.geoLocationPath = this._makePathAbsolute( settings.geoLocationPath, settings.rootPath ); } protected static _makePathAbsolute( path:string, rootPath:string ) { if ( path.indexOf( rootPath ) === 0 ) { return path; } return Files.joinPaths( [ rootPath, path ] ); } }