var Unibase; (function (Unibase) { let Platform; (function (Platform) { let Membership; (function (Membership) { let Infos; (function (Infos) { class setting { } Infos.setting = setting; class Identity { constructor() { } static getSetting(settingName) { return this.currentUser.settings.find(e => e.settingName == settingName).settingValue; } static setCurrentUser(identity) { var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance(); if (identity === null) { cookieHelper.setIdentityCookie(""); } else { var str = JSON.stringify(identity); cookieHelper.setIdentityCookie(str); } this.currentUser = identity; } static getCurrentUser() { if (this.currentUser === null || this.currentUser === undefined) { var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance(); var identityStr = cookieHelper.getIdentityCookie(); if (identityStr !== "") { var obj = JSON.parse(identityStr); this.currentUser = obj; } } return Identity.currentUser; } } Infos.Identity = Identity; class TenantSettings { constructor() { } } Infos.TenantSettings = TenantSettings; })(Infos = Membership.Infos || (Membership.Infos = {})); })(Membership = Platform.Membership || (Platform.Membership = {})); })(Platform = Unibase.Platform || (Unibase.Platform = {})); })(Unibase || (Unibase = {}));