mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-15 08:27:15 +00:00
feat(password-recovery): Add password recovery with secret question or secondary email
This commit is contained in:
1 parent
6931186bba
commit
656807b77d
47 files changed
+1729
-159
No files matched your search
@@ -1,2 +1,2 @@
|
||||
function l(){var n,e,t=arguments[0],i=t,r=arguments;for(labels[t]?i=labels[t]:clabels[t]&&(i=clabels[t]),n=1,e=0;n<r.length;n++,e++)i=i.replace("%{"+e+"}",r[n]);return i=(n=1)<r.length?i.replace(/%((%)|s|d)/g,function(e){var t=null;return e[2]?t=e[2]:(t=r[n],"%d"===e&&(t=parseFloat(t),isNaN(t)&&(t=0)),n++),t}):i}function hexToRgb(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}function contrast(e){var t=1,e=hexToRgb(e);if(e){for(var n=[e.r/255,e.g/255,e.b/255],i=0;i<n.length;++i)n[i]<=.03928?n[i]=n[i]/12.92:n[i]=Math.pow((n[i]+.055)/1.055,2.4);t=.2126*n[0]+.7152*n[1]+.0722*n[2]}return.179<t?"black":"white"}function guid(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return(e()+e()+"-"+e()+"-4"+e().substr(0,3)+"-"+e()+"-"+e()+e()+e()).toLowerCase()}!function(){"use strict";function e(e,t,n,i,r,o,s){e.classNameFilter(/^(?:(?!ng-animate-disabled).)*$/),r.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"fafafa",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastLightColors:["300","400","500","600","700","800","900"]}),r.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"]});e=r.extendPalette("grey",{1e3:"baa870"});r.definePalette("sogo-grey",e),r.theme("default").primaryPalette("sogo-blue",{default:"900","hue-1":"400","hue-2":"800","hue-3":"A700"}).accentPalette("sogo-green",{default:"500","hue-1":"A100","hue-2":"300","hue-3":"A700"}).backgroundPalette("sogo-grey"),r.registerStyles(["md-toolbar.md-hue-1:not(.md-menu-toolbar).md-accent,","md-toolbar.md-hue-1:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input {"," background-color: '{{accent-hue-1}}';"," color: '{{foreground-1}}';","}","md-toolbar.md-hue-1:not(.md-menu-toolbar).md-accent md-icon {"," color: '{{foreground-1}}';"," fill: '{{foreground-1}}';","}"].join("")),r.registerStyles([".md-autocomplete-suggestions.md-3-line li p {"," color: '{{foreground-2}}';","}"].join("")),r.registerStyles([".sg-time-selection-indicator.sg-time-selected,",".sg-time-selection-indicator:hover.sg-time-selected,",".sg-time-selection-indicator.md-focus.sg-time-selected {"," background: '{{primary-500}}';","}",".sg-timepicker-open .sg-timepicker-icon {"," color: '{{primary-900}}';","}",".sg-timepicker-time,",".sg-timepicker-open .sg-timepicker-input-container {"," background: '{{background-hue-1}}';","}",".sg-timepicker-input-mask-opaque {"," box-shadow: 0 0 0 9999px '{{background-hue-1}}';","}"].join("")),r.registerStyles(["[ui-view=calendars] .hours {"," color: '{{primary-700}}';","}",".attendees .busy {"," background-color: '{{background-1000}}';","}",".attendees .event {"," background-color: '{{primary-300}}';","}"].join("")),r.registerStyles([".sg-message-thread {"," background-color: '{{primary-100}}';","}",".sg-message-thread-first {"," background-color: '{{primary-200}}';","}"].join("")),window.DebugEnabled||(t.debugEnabled(!1),n.debugInfoEnabled(!1),o.disableWarnings(),s.errorOnUnhandledRejections(!1),r.generateThemesOnDemand(!0)),i.interceptors.push("AuthInterceptor"),i.interceptors.push("ErrorInterceptor")}function a(t,e,n,i,r){var o=e.defer(),s=angular.element('<iframe class="ng-hide" src="'+t.UserFolderURL+'recover"></iframe>');return s.on("load",function(){var e=i.get("$state");2<r.config.attempt?(angular.element(t).off("beforeunload"),t.location.href=t.ApplicationBaseURL+e.href(e.current),o.reject()):n(function(){var e=i.get("$http");r.config.attempt?r.config.attempt++:r.config.attempt=1,e(r.config).then(function(e){o.resolve(e)},function(e){o.reject(e)}).finally(function(){n(s.remove,1e3)})},2e3)}),document.body.appendChild(s[0]),o.promise}function t(n,i,r,o){return{response:function(e){var t;return e&&/^application\/json/.test(e.config.headers.Accept)&&/^[\n\r\t ]*<!DOCTYPE html/.test(e.data)?n.usesCASAuthentication||n.usesSAML2Authentication?a(n,i,r,o,e):(t=o.get("$state"),angular.element(n).off("beforeunload"),n.location.href=n.ApplicationBaseURL+t.href(t.current),i.reject()):e}}}function n(n,i,r,o,s){return{responseError:function(e){var t;if(/^application\/json/.test(e.config.headers.Accept)){if((i.usesCASAuthentication||i.usesSAML2Authentication)&&-1==e.status)return a(i,r,o,s,e);i.usesSAML2Authentication&&401==e.status&&!i.recovered?(t=s.get("$state"),angular.element(i).off("beforeunload"),i.recovered=!0,i.location.href=i.ApplicationBaseURL+t.href(t.current)):e.data&&e.data.quiet||n.$broadcast("http:Error",e)}return r.reject(e)}}}angular.module("SOGo.Common",["ngAnimate","ngMessages","ngSanitize","ngMaterial","mdColors"]).value("sgSettings",{isPopupLine truncated
|
||||
function l(){var n,e,t=arguments[0],o=t,r=arguments;for(labels[t]?o=labels[t]:clabels[t]&&(o=clabels[t]),n=1,e=0;n<r.length;n++,e++)o=o.replace("%{"+e+"}",r[n]);return o=(n=1)<r.length?o.replace(/%((%)|s|d)/g,function(e){var t=null;return e[2]?t=e[2]:(t=r[n],"%d"===e&&(t=parseFloat(t),isNaN(t)&&(t=0)),n++),t}):o}function hexToRgb(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}function contrast(e){var t=1,e=hexToRgb(e);if(e){for(var n=[e.r/255,e.g/255,e.b/255],o=0;o<n.length;++o)n[o]<=.03928?n[o]=n[o]/12.92:n[o]=Math.pow((n[o]+.055)/1.055,2.4);t=.2126*n[0]+.7152*n[1]+.0722*n[2]}return.179<t?"black":"white"}function guid(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return(e()+e()+"-"+e()+"-4"+e().substr(0,3)+"-"+e()+"-"+e()+e()+e()).toLowerCase()}!function(){"use strict";function e(e,t,n,o,r,i,s){e.classNameFilter(/^(?:(?!ng-animate-disabled).)*$/),r.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"fafafa",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastLightColors:["300","400","500","600","700","800","900"]}),r.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"]});e=r.extendPalette("grey",{1e3:"baa870"});r.definePalette("sogo-grey",e),r.theme("default").primaryPalette("sogo-blue",{default:"900","hue-1":"400","hue-2":"800","hue-3":"A700"}).accentPalette("sogo-green",{default:"500","hue-1":"A100","hue-2":"300","hue-3":"A700"}).backgroundPalette("sogo-grey"),r.registerStyles(["md-toolbar.md-hue-1:not(.md-menu-toolbar).md-accent,","md-toolbar.md-hue-1:not(.md-menu-toolbar).md-accent md-input-container[md-no-float] .md-input {"," background-color: '{{accent-hue-1}}';"," color: '{{foreground-1}}';","}","md-toolbar.md-hue-1:not(.md-menu-toolbar).md-accent md-icon {"," color: '{{foreground-1}}';"," fill: '{{foreground-1}}';","}"].join("")),r.registerStyles([".md-autocomplete-suggestions.md-3-line li p {"," color: '{{foreground-2}}';","}"].join("")),r.registerStyles([".sg-time-selection-indicator.sg-time-selected,",".sg-time-selection-indicator:hover.sg-time-selected,",".sg-time-selection-indicator.md-focus.sg-time-selected {"," background: '{{primary-500}}';","}",".sg-timepicker-open .sg-timepicker-icon {"," color: '{{primary-900}}';","}",".sg-timepicker-time,",".sg-timepicker-open .sg-timepicker-input-container {"," background: '{{background-hue-1}}';","}",".sg-timepicker-input-mask-opaque {"," box-shadow: 0 0 0 9999px '{{background-hue-1}}';","}"].join("")),r.registerStyles(["[ui-view=calendars] .hours {"," color: '{{primary-700}}';","}",".attendees .busy {"," background-color: '{{background-1000}}';","}",".attendees .event {"," background-color: '{{primary-300}}';","}"].join("")),r.registerStyles([".sg-message-thread {"," background-color: '{{primary-100}}';","}",".sg-message-thread-first {"," background-color: '{{primary-200}}';","}"].join("")),window.DebugEnabled||(t.debugEnabled(!1),n.debugInfoEnabled(!1),i.disableWarnings(),s.errorOnUnhandledRejections(!1),r.generateThemesOnDemand(!0)),o.interceptors.push("AuthInterceptor"),o.interceptors.push("ErrorInterceptor")}function a(t,e,n,o,r){var i=e.defer(),s=angular.element('<iframe class="ng-hide" src="'+t.UserFolderURL+'recover"></iframe>');return s.on("load",function(){var e=o.get("$state");2<r.config.attempt?(angular.element(t).off("beforeunload"),t.location.href=t.ApplicationBaseURL+e.href(e.current),i.reject()):n(function(){var e=o.get("$http");r.config.attempt?r.config.attempt++:r.config.attempt=1,e(r.config).then(function(e){i.resolve(e)},function(e){i.reject(e)}).finally(function(){n(s.remove,1e3)})},2e3)}),document.body.appendChild(s[0]),i.promise}function t(n,o,r,i){return{response:function(e){var t;return e&&/^application\/json/.test(e.config.headers.Accept)&&/^[\n\r\t ]*<!DOCTYPE html/.test(e.data)?n.usesCASAuthentication||n.usesSAML2Authentication?a(n,o,r,i,e):(t=i.get("$state"),angular.element(n).off("beforeunload"),n.location.href=n.ApplicationBaseURL+t.href(t.current),o.reject()):e}}}function n(n,o,r,i,s){return{responseError:function(e){var t;if(/^application\/json/.test(e.config.headers.Accept)){if((o.usesCASAuthentication||o.usesSAML2Authentication)&&-1==e.status)return a(o,r,i,s,e);o.usesSAML2Authentication&&401==e.status&&!o.recovered?(t=s.get("$state"),angular.element(o).off("beforeunload"),o.recovered=!0,o.location.href=o.ApplicationBaseURL+t.href(t.current)):e.data&&e.data.quiet||n.$broadcast("http:Error",e)}return r.reject(e)}}}angular.module("SOGo.Common",["ngAnimate","ngMessages","ngSanitize","ngMaterial","mdColors"]).value("sgSettings",{isPopupLine truncated
|
||||
//# sourceMappingURL=Common.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"Common.js","sources":["Common/utils.js","Common/Common.app.js","Common/mdColors.app.js","Common/decodeUri.filter.js","Common/encodeUri.filter.js","Common/ensureTarget.filter.js","Common/loc.filter.js","Common/range.filter.js","Common/txt2html.filter.js","Common/AclController.js","Common/navController.js","Common/Acl.service.js","Common/Authentication.service.js","Common/Dialog.service.js","Common/Gravatar.service.js","Common/Resource.service.js","Common/sgFocus.service.js","Common/sgHotkeys.service.js","Common/User.service.js","Common/sgAutogrow.directive.js","Common/sgAvatarImage.directive.js","Common/sgBlockToggle.directive.js","Common/sgCheckmark.directive.js","Common/sgColorPicker.directive.js","Common/sgCompile.directive.js","Common/sgDatepickerReadonlyInput.directive.js","Common/sgDraggable.directive.js","Common/sgDroppable.directive.js","Common/sgEnter.directive.js","Common/sgEscape.directive.js","Common/sgFocus.directive.js","Common/sgFolderStylesheet.directive.js","Common/sgLabels.directive.js","Common/sgNoDirtyCheck.directive.js","Common/sgPlaceholder.directive.js","Common/sgQrCode.directive.js","Common/sgResetOnDisabled.directive.js","Common/sgRippleClick.directive.js","Common/sgSearch.directive.js","Common/sgSelectOnly.directive.js","Common/sgSubscribe.directive.js","Common/sgTimepicker.directive.js","Common/sgToggleGrid.directive.js"],"names":["l","i","j","key","arguments","value","args","labels","clabels","length","replace","m","val","parseFloat","isNaN","hexToRgb","hex","result","exec","r","parseInt","g","b","contrast","color","c","Math","pow","guid","S4","random","toString","substring","substr","toLowerCase","configure","$animateProvider","$logProvider","$compileProvider","$httpProvider","$mdThemingProvider","$mdAriaProvider","$qProvider","classNameFilter","definePalette","50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700","contrastDefaultColor","contrastLightColors","contrastDarkColors","greyMap","extendPalette","1000","theme","primaryPalette","default","hue-1","hue-2","hue-3","accentPalette","backgroundPalette","registerStyles","join","window","DebugEnabled","debugEnabled","debugInfoEnabled","disableWarnings","errorOnUnhandledRejections","generateThemesOnDemand","interceptors","push","renewTicket","$window","$q","$timeout","$injector","response","deferred","defer","iframe","angular","element","UserFolderURL","on","$state","get","config","attempt","off","location","href","ApplicationBaseURL","current","reject","$http","then","resolve","finally","remove","document","body","appendChild","promise","AuthInterceptor","test","headers","Accept","data","usesCASAuthentication","usesSAML2Authentication","ErrorInterceptor","$rootScope","responseError","rejection","status","recovered","quiet","$broadcast","module","isPopup","classList","contains","baseURL","resourcesURL","ResourcesURL","activeUser","param","settings","login","UserLogin","identification","UserIdentification","email","UserEmail","language","UserLanguage","folderURL","isSuperUser","IsSuperUser","path","calendar","UserCalendarPath","contacts","UserContactsPath","mail","UserMailPath","preferences","UserPreferencesPath","administration","UserAdministrationPath","help","HelpURL","logoff","UserLogoffPath","minimumSearchLength","isNumber","constant","selection","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print","toastPosition","factory","$inject","_$mdThemingProvider","runBlock","$interpolate","$document","$log","buildCssSelectors","selectors","fgDefault","bgDefault","bdrDefault","fgDefaultHue","bgDefaultHue","fgColor","bgColor","bdrColor","fgHue","bgHue","customSheet","style","head","querySelector","createElement","title","createTextNode","sheet","getStyleSheet","index","cssRules","deleteRule","addRule","fgInterpolate","bgInterpolate","themeName","paletteName","colorArray","hueName","context","palette","hue","insertRule","addBorderRule","bdrInterpolate","colorValue","forEach","_THEMES","_PALETTES","colors","primary","name","hues","run","decodeUri","decodeURIComponent","filter","encodeUri","encodeURIComponent","ensureTarget","$sce","tree","find","attr","trustAs","html","n","res","txt2html","linkyFilter","text","String","rel","undefined","AclController","$mdDialog","Dialog","usersWithACL","User","folder","vm","this","selectUser","user","$event","target","parentNode","selectedUid","uid","selectedUser","inactive","$rights","users","userToAdd","searchText","folderClassName","isFunction","getClassName","templateName","getElementById","$isAnonymous","userFilter","$query","$filter","$acl","dry","closeModal","$resetUsersRights","hide","saveModal","$saveUsersRights","alert","confirmChange","confirmation","$confirmRights","showing","message","removeUser","$removeUser","addUser","$addUser","toggleAllRights","$toggleAllRights","hasNoRight","$hasNoRight","showRights","controller","navController","$scope","$interval","$mdSidenav","$mdToast","$mdMedia","sgConstant","sgSettings","Resource",Line truncated
|
||||
{"version":3,"file":"Common.js","sources":["Common/utils.js","Common/Common.app.js","Common/mdColors.app.js","Common/decodeUri.filter.js","Common/encodeUri.filter.js","Common/ensureTarget.filter.js","Common/loc.filter.js","Common/range.filter.js","Common/txt2html.filter.js","Common/AclController.js","Common/navController.js","Common/Acl.service.js","Common/Authentication.service.js","Common/Dialog.service.js","Common/Gravatar.service.js","Common/Resource.service.js","Common/sgFocus.service.js","Common/sgHotkeys.service.js","Common/sgRippleClick.service.js","Common/User.service.js","Common/sgAutogrow.directive.js","Common/sgAvatarImage.directive.js","Common/sgBlockToggle.directive.js","Common/sgCheckmark.directive.js","Common/sgColorPicker.directive.js","Common/sgCompile.directive.js","Common/sgDatepickerReadonlyInput.directive.js","Common/sgDraggable.directive.js","Common/sgDroppable.directive.js","Common/sgEnter.directive.js","Common/sgEscape.directive.js","Common/sgFocus.directive.js","Common/sgFolderStylesheet.directive.js","Common/sgLabels.directive.js","Common/sgNoDirtyCheck.directive.js","Common/sgPlaceholder.directive.js","Common/sgQrCode.directive.js","Common/sgResetOnDisabled.directive.js","Common/sgRippleClick.directive.js","Common/sgSearch.directive.js","Common/sgSelectOnly.directive.js","Common/sgSubscribe.directive.js","Common/sgTimepicker.directive.js","Common/sgToggleGrid.directive.js"],"names":["l","i","j","key","arguments","value","args","labels","clabels","length","replace","m","val","parseFloat","isNaN","hexToRgb","hex","result","exec","r","parseInt","g","b","contrast","color","c","Math","pow","guid","S4","random","toString","substring","substr","toLowerCase","configure","$animateProvider","$logProvider","$compileProvider","$httpProvider","$mdThemingProvider","$mdAriaProvider","$qProvider","classNameFilter","definePalette","50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700","contrastDefaultColor","contrastLightColors","contrastDarkColors","greyMap","extendPalette","1000","theme","primaryPalette","default","hue-1","hue-2","hue-3","accentPalette","backgroundPalette","registerStyles","join","window","DebugEnabled","debugEnabled","debugInfoEnabled","disableWarnings","errorOnUnhandledRejections","generateThemesOnDemand","interceptors","push","renewTicket","$window","$q","$timeout","$injector","response","deferred","defer","iframe","angular","element","UserFolderURL","on","$state","get","config","attempt","off","location","href","ApplicationBaseURL","current","reject","$http","then","resolve","finally","remove","document","body","appendChild","promise","AuthInterceptor","test","headers","Accept","data","usesCASAuthentication","usesSAML2Authentication","ErrorInterceptor","$rootScope","responseError","rejection","status","recovered","quiet","$broadcast","module","isPopup","classList","contains","baseURL","resourcesURL","ResourcesURL","activeUser","param","settings","login","UserLogin","identification","UserIdentification","email","UserEmail","language","UserLanguage","folderURL","isSuperUser","IsSuperUser","path","calendar","UserCalendarPath","contacts","UserContactsPath","mail","UserMailPath","preferences","UserPreferencesPath","administration","UserAdministrationPath","help","HelpURL","logoff","UserLogoffPath","minimumSearchLength","isNumber","constant","selection","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print","toastPosition","factory","$inject","_$mdThemingProvider","runBlock","$interpolate","$document","$log","buildCssSelectors","selectors","fgDefault","bgDefault","bdrDefault","fgDefaultHue","bgDefaultHue","fgColor","bgColor","bdrColor","fgHue","bgHue","customSheet","style","head","querySelector","createElement","title","createTextNode","sheet","getStyleSheet","index","cssRules","deleteRule","addRule","fgInterpolate","bgInterpolate","themeName","paletteName","colorArray","hueName","context","palette","hue","insertRule","addBorderRule","bdrInterpolate","colorValue","forEach","_THEMES","_PALETTES","colors","primary","name","hues","run","decodeUri","decodeURIComponent","filter","encodeUri","encodeURIComponent","ensureTarget","$sce","tree","find","attr","trustAs","html","n","res","txt2html","linkyFilter","text","String","rel","undefined","AclController","$mdDialog","Dialog","usersWithACL","User","folder","vm","this","selectUser","user","$event","target","parentNode","selectedUid","uid","selectedUser","inactive","$rights","users","userToAdd","searchText","folderClassName","isFunction","getClassName","templateName","getElementById","$isAnonymous","userFilter","$query","$filter","$acl","dry","closeModal","$resetUsersRights","hide","saveModal","$saveUsersRights","alert","confirmChange","confirmation","$confirmRights","showing","message","removeUser","$removeUser","addUser","$addUser","toggleAllRights","$toggleAllRights","hasNoRight","$hasNoRight","showRights","controller","navController","$scope","$interval","$mdSidenav","$mdToast","$mdMedia","sgLine truncated
|
||||
@@ -20,6 +20,8 @@
|
||||
PolicyPasswordTooShort: 6,
|
||||
PolicyPasswordTooYoung: 7,
|
||||
PolicyPasswordInHistory: 8,
|
||||
PolicyPasswordRecoveryFailed: 9,
|
||||
PolicyPasswordRecoveryInvalidToken: 10,
|
||||
PolicyNoError: 65535
|
||||
})
|
||||
|
||||
@@ -168,7 +170,7 @@
|
||||
return d.promise;
|
||||
}, // login: function(data) { ...
|
||||
|
||||
changePassword: function(userName, domain, newPassword, oldPassword) {
|
||||
changePassword: function(userName, domain, newPassword, oldPassword, token) {
|
||||
var d = $q.defer(),
|
||||
xsrfCookie = $cookies.get('XSRF-TOKEN');
|
||||
|
||||
@@ -180,7 +182,7 @@
|
||||
headers: {
|
||||
'X-XSRF-TOKEN' : xsrfCookie
|
||||
},
|
||||
data: { userName: userName, newPassword: newPassword, oldPassword: oldPassword }
|
||||
data: { userName: userName, newPassword: newPassword, oldPassword: oldPassword, token: token }
|
||||
}).then(function() {
|
||||
d.resolve({url: redirectUrl(userName, domain)});
|
||||
}, function(response) {
|
||||
@@ -205,6 +207,8 @@
|
||||
error = l("Password change failed - Password is too young");
|
||||
} else if (perr == passwordPolicyConfig.PolicyPasswordInHistory) {
|
||||
error = l("Password change failed - Password is in history");
|
||||
} else if (perr == passwordPolicyConfig.PolicyPasswordRecoveryInvalidToken) {
|
||||
error = l("Invalid token. Could not change password");
|
||||
} else {
|
||||
error = l("Unhandled policy error: %{0}").formatted(perr);
|
||||
perr = passwordPolicyConfig.PolicyPasswordUnknown;
|
||||
@@ -215,6 +219,113 @@
|
||||
d.reject(error);
|
||||
});
|
||||
return d.promise;
|
||||
},
|
||||
|
||||
passwordRecovery: function (userName, domain) {
|
||||
const self = this;
|
||||
|
||||
var d = $q.defer(),
|
||||
xsrfCookie = $cookies.get('XSRF-TOKEN');
|
||||
|
||||
$cookies.remove('XSRF-TOKEN', { path: '/SOGo/' });
|
||||
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: '/SOGo/so/passwordRecovery',
|
||||
headers: {
|
||||
'X-XSRF-TOKEN': xsrfCookie
|
||||
},
|
||||
data: { userName: userName, domain: domain }
|
||||
}).then(function (response) {
|
||||
d.resolve(Object.assign(
|
||||
{ url: redirectUrl(userName, domain) },
|
||||
response.data,
|
||||
'SecretQuestion' === response.data.mode ? { secretQuestionLabel: l('passwordRecovery_' + response.data.secretQuestion) } : {},
|
||||
'SecondaryEmail' === response.data.mode ? { obfuscatedRecoveryEmail: response.data.obfuscatedSecondaryEmail } : {}
|
||||
));
|
||||
}, function () {
|
||||
// Restore the cookie
|
||||
$cookies.put('XSRF-TOKEN', xsrfCookie, { path: '/SOGo/' });
|
||||
d.reject(l("Unhandled policy error: %{0}").formatted(passwordPolicyConfig.PolicyPasswordRecoveryFailed));
|
||||
});
|
||||
return d.promise;
|
||||
},
|
||||
|
||||
|
||||
passwordRecoveryEmail: function (userName, domain, mode, mailDomain) {
|
||||
const self = this;
|
||||
|
||||
var d = $q.defer(),
|
||||
xsrfCookie = $cookies.get('XSRF-TOKEN');
|
||||
|
||||
$cookies.remove('XSRF-TOKEN', { path: '/SOGo/' });
|
||||
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: '/SOGo/so/passwordRecoveryEmail',
|
||||
headers: {
|
||||
'X-XSRF-TOKEN': xsrfCookie
|
||||
},
|
||||
data: { userName: userName, domain: domain, mode: mode, mailDomain: mailDomain }
|
||||
}).then(function (response) {
|
||||
d.resolve(response.data.jwt);
|
||||
}, function (response) {
|
||||
// Restore the cookie
|
||||
$cookies.put('XSRF-TOKEN', xsrfCookie, { path: '/SOGo/' });
|
||||
d.reject(l(response.data));
|
||||
});
|
||||
return d.promise;
|
||||
},
|
||||
|
||||
|
||||
passwordRecoveryCheck: function (userName, domain, mode, question, answer, mailDomain) {
|
||||
const self = this;
|
||||
|
||||
var d = $q.defer(),
|
||||
xsrfCookie = $cookies.get('XSRF-TOKEN');
|
||||
|
||||
$cookies.remove('XSRF-TOKEN', { path: '/SOGo/' });
|
||||
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: '/SOGo/so/passwordRecoveryCheck',
|
||||
headers: {
|
||||
'X-XSRF-TOKEN': xsrfCookie
|
||||
},
|
||||
data: { userName: userName, domain: domain, mode: mode, question: question, answer: answer, mailDomain: mailDomain }
|
||||
}).then(function (response) {
|
||||
d.resolve(response.data.jwt);
|
||||
}, function (response) {
|
||||
// Restore the cookie
|
||||
$cookies.put('XSRF-TOKEN', xsrfCookie, { path: '/SOGo/' });
|
||||
d.reject(l(response.data));
|
||||
});
|
||||
return d.promise;
|
||||
},
|
||||
|
||||
passwordRecoveryEnabled: function (userName, domain) {
|
||||
const self = this;
|
||||
|
||||
var d = $q.defer(),
|
||||
xsrfCookie = $cookies.get('XSRF-TOKEN');
|
||||
|
||||
$cookies.remove('XSRF-TOKEN', { path: '/SOGo/' });
|
||||
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: '/SOGo/so/passwordRecoveryEnabled',
|
||||
headers: {
|
||||
'X-XSRF-TOKEN': xsrfCookie
|
||||
},
|
||||
data: { userName: userName, domain: domain }
|
||||
}).then(function (response) {
|
||||
d.resolve(response.data.domain);
|
||||
}, function () {
|
||||
// Restore the cookie
|
||||
$cookies.put('XSRF-TOKEN', xsrfCookie, { path: '/SOGo/' });
|
||||
d.reject();
|
||||
});
|
||||
return d.promise;
|
||||
}
|
||||
};
|
||||
return service;
|
||||
|
||||
@@ -20,14 +20,43 @@
|
||||
</md-dialog>
|
||||
|
||||
*/
|
||||
sgRippleClick.$inject = ['$log', '$timeout'];
|
||||
function sgRippleClick($log, $timeout) {
|
||||
sgRippleClick.$inject = ['$log', '$timeout', '$rootScope'];
|
||||
function sgRippleClick($log, $timeout, scope) {
|
||||
|
||||
function rippleEffect(element, coordinates, container, content) {
|
||||
// Show ripple
|
||||
angular.element(container).css({ 'overflow': 'hidden', 'position': 'relative' });
|
||||
angular.element(content).css({ top: container.scrollTop + 'px' });
|
||||
|
||||
element.css({
|
||||
'top': (coordinates.top - container.offsetTop + container.scrollTop) + 'px',
|
||||
'left': (coordinates.left - container.offsetLeft) + 'px',
|
||||
'height': '400vmin',
|
||||
'width': '400vmin'
|
||||
});
|
||||
|
||||
// Show ripple content
|
||||
content.classList.remove('ng-hide');
|
||||
}
|
||||
|
||||
scope.$on('sgRippleDo', function (e, containerName) {
|
||||
const container = document.getElementById(containerName);
|
||||
container.classList.remove('ng-hide');
|
||||
rippleEffect(
|
||||
angular.element(document.querySelector('sg-ripple'))
|
||||
, { left: (window.innerWidth / 2), top: (window.innerHeight / 2) }
|
||||
, container
|
||||
, document.querySelector('sg-ripple-content')
|
||||
);
|
||||
});
|
||||
|
||||
return {
|
||||
restrict: 'A',
|
||||
compile: compile
|
||||
};
|
||||
|
||||
|
||||
|
||||
function compile(tElement, tAttrs) {
|
||||
|
||||
return function postLink(scope, element, attr) {
|
||||
@@ -90,26 +119,16 @@
|
||||
}
|
||||
|
||||
if (content.classList.contains('ng-hide')) {
|
||||
// Show ripple
|
||||
angular.element(container).css({ 'overflow': 'hidden', 'position': 'relative' });
|
||||
angular.element(content).css({ top: container.scrollTop + 'px' });
|
||||
$timeout(function() {
|
||||
// Wait until next digest for CSS animation to work
|
||||
ripple.css({
|
||||
'top': (coordinates.top - container.offsetTop + container.scrollTop) + 'px',
|
||||
'left': (coordinates.left - container.offsetLeft) + 'px',
|
||||
'height': '400vmin',
|
||||
'width': '400vmin'
|
||||
});
|
||||
// Show ripple content
|
||||
content.classList.remove('ng-hide');
|
||||
rippleEffect(ripple, coordinates, container, content);
|
||||
});
|
||||
}
|
||||
else {
|
||||
// Hide ripple layer
|
||||
ripple.css({
|
||||
'top': (coordinates.top - container.offsetTop + container.scrollTop) + 'px',
|
||||
'left': (coordinates.left - container.offsetLeft) + 'px',
|
||||
'left': (coordinates.left - container.offsetLeft) + 'px',
|
||||
'height': '0px',
|
||||
'width': '0px'
|
||||
});
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* sgFocus - A service to set the focus on the element associated to a specific string
|
||||
* @memberof SOGo.Common
|
||||
* @param {string} name - the string identifier of the element
|
||||
* @see {@link SOGo.Common.sgRippleClick}
|
||||
* @ngInject
|
||||
*/
|
||||
sgRippleClick.$inject = ['$rootScope', '$timeout'];
|
||||
function sgRippleClick($rootScope, $timeout) {
|
||||
return function (containerName) {
|
||||
$timeout(function() {
|
||||
$rootScope.$broadcast('sgRippleDo', containerName);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
angular
|
||||
.module('SOGo.Common')
|
||||
.factory('sgRippleClick', sgRippleClick);
|
||||
})();
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function o(o,s,e,n,i,r,t){var a=this;this.$onInit=function(){this.creds={username:s.cookieUsername,password:null,domain:null,rememberLogin:angular.isDefined(s.cookieUsername)&&0<s.cookieUsername.length},/\blanguage=/.test(s.location.search)&&(this.creds.language=s.language),this.loginState=!1,this.verificationCodePattern="\\d{6}",this.passwords={newPassword:null,newPasswordConfirmation:null,oldPassword:null},this.showLogin=!1,e(function(){a.showLogin=!0},100)},this.login=function(){return a.loginState="authenticating",r.login(a.creds).then(function(o){o.totpmissingkey?(a.loginState="totpcode",t("totpcode")):o.totpdisabled?(a.loginState="totpdisabled",a.cn=o.cn,a.url=o.url):(a.loginState="logged",a.cn=o.cn,a.url=o.url,e(function(){a.continueLogin()},1e3))},function(o){var s,e;a.loginState="error",o.error?a.errorMessage=o.error:0<o.grace?(a.loginState="passwordwillexpire",a.cn=o.cn,a.url=o.url,a.errorMessage=l("You have %{0} logins remaining before your account is locked. Please change your password in the preference dialog.",o.grace)):0<o.expire?(e=86400<o.expire?(s=Math.round(o.expire/86400),l("days")):3600<o.expire?(s=Math.round(o.expire/3600),l("hours")):60<o.expire?(s=Math.round(o.expire/60),l("minutes")):(s=o.expire,l("seconds")),a.loginState="passwordwillexpire",a.cn=o.cn,a.url=o.url,a.errorMessage=l("Your password is going to expire in %{0} %{1}.",s,e)):o.passwordexpired&&(a.loginState="passwordexpired",a.url=o.url)}),!1},this.restoreLogin=function(){a.loginState=!1,delete a.creds.verificationCode},this.continueLogin=function(){s.location.href===a.url?s.location.reload(!0):s.location.href=a.url},this.showAbout=function(o){function s(o){this.closeDialog=function(){o.hide()}}i.show({targetEvent:o,templateUrl:"aboutBox.html",controller:s,controllerAs:"about"}),s.$inject=["$mdDialog"]},this.changeLanguage=function(o){s.location.href=ApplicationBaseURL+"login?language="+this.creds.language},this.canChangePassword=function(o){return this.passwords.newPasswordConfirmation&&this.passwords.newPasswordConfirmation.length&&this.passwords.newPassword!=this.passwords.newPasswordConfirmation?(o.newPasswordConfirmation.$setValidity("newPasswordMismatch",!1),!1):(o.newPasswordConfirmation.$setValidity("newPasswordMismatch",!0),!!(this.passwords.newPassword&&0<this.passwords.newPassword.length&&this.passwords.newPasswordConfirmation&&this.passwords.newPasswordConfirmation.length&&this.passwords.newPassword==this.passwords.newPasswordConfirmation&&this.passwords.oldPassword&&0<this.passwords.oldPassword.length))},this.changePassword=function(){r.changePassword(this.creds.username,this.creds.domain,this.passwords.newPassword,this.passwords.oldPassword).then(function(o){a.loginState="message",a.url=o.url,a.errorMessage=l("The password was changed successfully.")},function(o){a.loginState="error",a.errorMessage=o})}}angular.module("SOGo.MainUI",["SOGo.Common","SOGo.Authentication"]),o.$inject=["$scope","$window","$timeout","Dialog","$mdDialog","Authentication","sgFocus"],angular.module("SOGo.MainUI").controller("LoginController",o)}();
|
||||
!function(){"use strict";angular.module("SOGo.MainUI",["SOGo.Common","SOGo.Authentication"]);function e(e,o,s,r,n,a,i,t){var d=this;this.$onInit=function(){this.creds={username:o.cookieUsername,password:null,domain:null,rememberLogin:angular.isDefined(o.cookieUsername)&&0<o.cookieUsername.length},/\blanguage=/.test(o.location.search)&&(this.creds.language=o.language),this.loginState=!1,this.verificationCodePattern="\\d{6}",this.passwords={newPassword:null,newPasswordConfirmation:null,oldPassword:null},this.passwordRecovery={passwordRecoveryEnabled:!1,passwordRecoveryQuestionKey:null,passwordRecoveryQuestion:null,passwordRecoveryMode:null,passwordRecoveryQuestionAnswer:null,passwordRecoveryToken:null,passwordRecoveryLinkTimer:null,passwordRecoverySecondaryEmailText:null,passwordRecoveryMailDomain:null},this.showLogin=!1,s(function(){d.showLogin=!0;var e=window.location.search;const o=new URLSearchParams(e);let s=o.get("token");0<window.location.pathname.indexOf("passwordRecoveryEmail")&&s?3===(e=(s=s.replace(/\//g,"")).split(".")).length&&(d.passwordRecovery.passwordRecoveryToken=s,e=JSON.parse(atob(e[1])),d.creds.username=e.username,d.creds.domain=e.domain,d.passwordRecovery.passwordRecoveryToken=s,d.passwordRecovery.passwordRecoveryMode="SecondaryEmail",d.passwordRecovery.passwordRecoveryEnabled=!0,d.loginState="passwordchange",d.showLogin=!1,t("loginContent")):d.retrievePasswordRecoveryEnabled()},100)},this.login=function(){return d.loginState="authenticating",a.login(d.creds).then(function(e){e.totpmissingkey?(d.loginState="totpcode",i("totpcode")):e.totpdisabled?(d.loginState="totpdisabled",d.cn=e.cn,d.url=e.url):(d.loginState="logged",d.cn=e.cn,d.url=e.url,s(function(){d.continueLogin()},1e3))},function(e){var o,s;d.loginState="error",e.error?d.errorMessage=e.error:0<e.grace?(d.loginState="passwordwillexpire",d.cn=e.cn,d.url=e.url,d.errorMessage=l("You have %{0} logins remaining before your account is locked. Please change your password in the preference dialog.",e.grace)):0<e.expire?(s=86400<e.expire?(o=Math.round(e.expire/86400),l("days")):3600<e.expire?(o=Math.round(e.expire/3600),l("hours")):60<e.expire?(o=Math.round(e.expire/60),l("minutes")):(o=e.expire,l("seconds")),d.loginState="passwordwillexpire",d.cn=e.cn,d.url=e.url,d.errorMessage=l("Your password is going to expire in %{0} %{1}.",o,s)):e.passwordexpired&&(d.loginState="passwordchange",d.url=e.url)}),!1},this.restoreLogin=function(){d.loginState=!1,delete d.creds.verificationCode,d.isInPasswordRecoveryMode()&&d.passwordRecoveryAbort()},this.continueLogin=function(){o.location.href===d.url?o.location.reload(!0):o.location.href=d.url},this.showAbout=function(e){function o(e){this.closeDialog=function(){e.hide()}}n.show({targetEvent:e,templateUrl:"aboutBox.html",controller:o,controllerAs:"about"}),o.$inject=["$mdDialog"]},this.changeLanguage=function(e){o.location.href=ApplicationBaseURL+"login?language="+this.creds.language},this.hello=function(e){return!1},this.canChangePassword=function(e){return this.passwords.newPasswordConfirmation&&this.passwords.newPasswordConfirmation.length&&this.passwords.newPassword!=this.passwords.newPasswordConfirmation?(e.newPasswordConfirmation.$setValidity("newPasswordMismatch",!1),!1):(e.newPasswordConfirmation.$setValidity("newPasswordMismatch",!0),!!(this.passwords.newPassword&&0<this.passwords.newPassword.length&&this.passwords.newPasswordConfirmation&&this.passwords.newPasswordConfirmation.length&&this.passwords.newPassword==this.passwords.newPasswordConfirmation&&(this.isInPasswordRecoveryMode()||!this.loginState&&this.passwords.oldPassword&&0<this.passwords.oldPassword.length)))},this.changePassword=function(){a.changePassword(this.creds.username,this.creds.domain,this.passwords.newPassword,this.passwords.oldPassword,this.passwordRecovery.passwordRecoveryToken).then(function(e){d.loginState="message",d.url=e.url,d.errorMessage=l("The password was changed successfully.")},function(e){d.loginState="error",d.errorMessage=e})},this.passwordRecoveryInfo=function(){d.loginState="passwordrecovery",a.passwordRecovery(this.creds.username,this.creds.domain).then(function(e){d.passwordRecovery.passwordRecoveryMode=e.mode,"SecretQuestion"===e.mode?(d.passwordRecovery.passwordRecoveryQuestion=e.secretQuestionLabel,d.passwordRecovery.passwordRecoveryQuestionKey=e.secretQuestion):"SecondaryEmail"===e.mode?d.passwordRecovery.passwordRecoverySecondaryEmailText=l("A link will be sent to %{0}",e.obfuscatedRecoveryEmail):"Disabled"===e.mode&&(d.loginState="error",d.errorMessage=l("No password recovery method has been defined for this user"))},function(e){d.loginState="error",d.errorMessage=e})},this.passwordRecoveryEmail=function(){a.passwordRecoveryEmail(this.creds.username,this.creds.domain,this.passwordRecovery.passwordRecoveryMode,this.passwordRecovery.passwordRecoveryMailDomain).then(function(){d.loginState="sendrecoverymail"},function(e){d.loginState="error",d.errorMessage=e})},this.passwordRecoveryCheck=function(){Line truncated
|
||||
//# sourceMappingURL=Main.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"Main.js","sources":["Main/Main.app.js"],"names":["LoginController","$scope","$window","$timeout","Dialog","$mdDialog","Authentication","focus","vm","this","$onInit","creds","username","cookieUsername","password","domain","rememberLogin","angular","isDefined","length","test","location","search","language","loginState","verificationCodePattern","passwords","newPassword","newPasswordConfirmation","oldPassword","showLogin","login","then","data","totpmissingkey","totpdisabled","cn","url","continueLogin","msg","value","string","error","errorMessage","grace","l","expire","Math","round","passwordexpired","restoreLogin","verificationCode","href","reload","showAbout","$event","AboutDialogController","closeDialog","hide","show","targetEvent","templateUrl","controller","controllerAs","$inject","changeLanguage","ApplicationBaseURL","canChangePassword","form","$setValidity","changePassword","module"],"mappings":"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"}
|
||||
{"version":3,"file":"Main.js","sources":["Main/Main.app.js"],"names":["angular","module","LoginController","$scope","$window","$timeout","Dialog","$mdDialog","Authentication","focus","rippleDo","vm","this","$onInit","creds","username","cookieUsername","password","domain","rememberLogin","isDefined","length","test","location","search","language","loginState","verificationCodePattern","passwords","newPassword","newPasswordConfirmation","oldPassword","passwordRecovery","passwordRecoveryEnabled","passwordRecoveryQuestionKey","passwordRecoveryQuestion","passwordRecoveryMode","passwordRecoveryQuestionAnswer","passwordRecoveryToken","passwordRecoveryLinkTimer","passwordRecoverySecondaryEmailText","passwordRecoveryMailDomain","showLogin","queryString","window","urlParams","URLSearchParams","let","token","get","pathname","indexOf","tokenArray","replace","split","info","JSON","parse","atob","retrievePasswordRecoveryEnabled","login","then","data","totpmissingkey","totpdisabled","cn","url","continueLogin","msg","value","string","error","errorMessage","grace","l","expire","Math","round","passwordexpired","restoreLogin","verificationCode","isInPasswordRecoveryMode","passwordRecoveryAbort","href","reload","showAbout","$event","AboutDialogController","closeDialog","hide","show","targetEvent","templateUrl","controller","controllerAs","$inject","changeLanguage","ApplicationBaseURL","hello","form","canChangePassword","$setValidity","changePassword","passwordRecoveryInfo","mode","secretQuestionLabel","secretQuestion","obfuscatedRecoveryEmail","passwordRecoveryEmail","passwordRecoveryCheck","usernameChanged","clearTimeout","setTimeout","mailDomain"],"mappings":"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 truncated
|
||||
@@ -1,19 +1,19 @@
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* JavaScript for MainUI (SOGoRootPage) */
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
angular.module('SOGo.MainUI', ['SOGo.Common', 'SOGo.Authentication']);
|
||||
const PASSWORD_RECOVERY_TIMER_MS = 2000;
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication', 'sgFocus'];
|
||||
function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication, focus) {
|
||||
LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication', 'sgFocus', 'sgRippleClick'];
|
||||
function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication, focus, rippleDo) {
|
||||
var vm = this;
|
||||
|
||||
this.$onInit = function() {
|
||||
this.$onInit = function () {
|
||||
this.creds = {
|
||||
username: $window.cookieUsername,
|
||||
password: null,
|
||||
@@ -31,9 +31,53 @@
|
||||
// Password policy - change expired password
|
||||
this.passwords = { newPassword: null, newPasswordConfirmation: null, oldPassword: null };
|
||||
|
||||
// Password recovery
|
||||
this.passwordRecovery = {
|
||||
passwordRecoveryEnabled: false,
|
||||
passwordRecoveryQuestionKey: null,
|
||||
passwordRecoveryQuestion: null,
|
||||
passwordRecoveryMode: null,
|
||||
passwordRecoveryQuestionAnswer: null,
|
||||
passwordRecoveryToken: null,
|
||||
passwordRecoveryLinkTimer: null,
|
||||
passwordRecoverySecondaryEmailText: null,
|
||||
passwordRecoveryMailDomain: null
|
||||
};
|
||||
|
||||
// Show login once everything is initialized
|
||||
this.showLogin = false;
|
||||
$timeout(function() { vm.showLogin = true; }, 100);
|
||||
$timeout(function () {
|
||||
vm.showLogin = true;
|
||||
|
||||
const queryString = window.location.search;
|
||||
const urlParams = new URLSearchParams(queryString);
|
||||
let token = urlParams.get('token');
|
||||
|
||||
if (0 < window.location.pathname.indexOf("passwordRecoveryEmail") && token) {
|
||||
token = token.replace(/\//g, ''); // remove trailing '/'
|
||||
const tokenArray = token.split(".");
|
||||
|
||||
// Retrieve info from token
|
||||
if (3 === tokenArray.length) {
|
||||
vm.passwordRecovery.passwordRecoveryToken = token;
|
||||
const info = JSON.parse(atob(tokenArray[1]));
|
||||
vm.creds.username = info.username;
|
||||
vm.creds.domain = info.domain;
|
||||
vm.passwordRecovery.passwordRecoveryToken = token;
|
||||
vm.passwordRecovery.passwordRecoveryMode = "SecondaryEmail";
|
||||
vm.passwordRecovery.passwordRecoveryEnabled = true;
|
||||
|
||||
vm.loginState = 'passwordchange';
|
||||
vm.showLogin = false;
|
||||
rippleDo('loginContent');
|
||||
}
|
||||
|
||||
} else {
|
||||
vm.retrievePasswordRecoveryEnabled();
|
||||
}
|
||||
}, 100);
|
||||
|
||||
|
||||
};
|
||||
|
||||
this.login = function() {
|
||||
@@ -98,7 +142,7 @@
|
||||
vm.errorMessage = l('Your password is going to expire in %{0} %{1}.', value, string);
|
||||
}
|
||||
else if (msg.passwordexpired) {
|
||||
vm.loginState = 'passwordexpired';
|
||||
vm.loginState = 'passwordchange';
|
||||
vm.url = msg.url;
|
||||
}
|
||||
|
||||
@@ -109,6 +153,9 @@
|
||||
this.restoreLogin = function() {
|
||||
vm.loginState = false;
|
||||
delete vm.creds.verificationCode;
|
||||
if (vm.isInPasswordRecoveryMode()) {
|
||||
vm.passwordRecoveryAbort();
|
||||
}
|
||||
};
|
||||
|
||||
this.continueLogin = function() {
|
||||
@@ -138,6 +185,10 @@
|
||||
$window.location.href = ApplicationBaseURL + 'login?language=' + this.creds.language;
|
||||
};
|
||||
|
||||
this.hello = function (form) {
|
||||
return !true;
|
||||
}
|
||||
|
||||
this.canChangePassword = function(form) {
|
||||
if (this.passwords.newPasswordConfirmation && this.passwords.newPasswordConfirmation.length &&
|
||||
this.passwords.newPassword != this.passwords.newPasswordConfirmation) {
|
||||
@@ -150,14 +201,15 @@
|
||||
if (this.passwords.newPassword && this.passwords.newPassword.length > 0 &&
|
||||
this.passwords.newPasswordConfirmation && this.passwords.newPasswordConfirmation.length &&
|
||||
this.passwords.newPassword == this.passwords.newPasswordConfirmation &&
|
||||
this.passwords.oldPassword && this.passwords.oldPassword.length > 0)
|
||||
((this.isInPasswordRecoveryMode()) ||
|
||||
(!this.loginState && this.passwords.oldPassword && this.passwords.oldPassword.length > 0)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
this.changePassword = function() {
|
||||
Authentication.changePassword(this.creds.username, this.creds.domain, this.passwords.newPassword, this.passwords.oldPassword).then(function(data) {
|
||||
Authentication.changePassword(this.creds.username, this.creds.domain, this.passwords.newPassword, this.passwords.oldPassword, this.passwordRecovery.passwordRecoveryToken).then(function(data) {
|
||||
vm.loginState = 'message';
|
||||
vm.url = data.url;
|
||||
vm.errorMessage = l('The password was changed successfully.');
|
||||
@@ -167,6 +219,95 @@
|
||||
});
|
||||
};
|
||||
|
||||
this.passwordRecoveryInfo = function () {
|
||||
vm.loginState = 'passwordrecovery';
|
||||
Authentication.passwordRecovery(this.creds.username, this.creds.domain).then(function (data) {
|
||||
vm.passwordRecovery.passwordRecoveryMode = data.mode;
|
||||
if ('SecretQuestion' === data.mode) {
|
||||
vm.passwordRecovery.passwordRecoveryQuestion = data.secretQuestionLabel;
|
||||
vm.passwordRecovery.passwordRecoveryQuestionKey = data.secretQuestion;
|
||||
} else if ('SecondaryEmail' === data.mode) {
|
||||
vm.passwordRecovery.passwordRecoverySecondaryEmailText = l("A link will be sent to %{0}", data.obfuscatedRecoveryEmail);
|
||||
} else if ('Disabled' === data.mode) {
|
||||
vm.loginState = 'error';
|
||||
vm.errorMessage = l('No password recovery method has been defined for this user');
|
||||
}
|
||||
}, function (msg) {
|
||||
vm.loginState = 'error';
|
||||
vm.errorMessage = msg;
|
||||
});
|
||||
};
|
||||
|
||||
this.passwordRecoveryEmail = function () {
|
||||
Authentication.passwordRecoveryEmail(this.creds.username, this.creds.domain
|
||||
, this.passwordRecovery.passwordRecoveryMode
|
||||
, this.passwordRecovery.passwordRecoveryMailDomain).then(function () {
|
||||
vm.loginState = 'sendrecoverymail';
|
||||
}, function (msg) {
|
||||
vm.loginState = 'error';
|
||||
vm.errorMessage = msg;
|
||||
});
|
||||
};
|
||||
|
||||
this.passwordRecoveryCheck = function () {
|
||||
Authentication.passwordRecoveryCheck(this.creds.username, this.creds.domain
|
||||
, this.passwordRecovery.passwordRecoveryMode
|
||||
, this.passwordRecovery.passwordRecoveryQuestionKey
|
||||
, this.passwordRecovery.passwordRecoveryQuestionAnswer
|
||||
, this.passwordRecovery.passwordRecoveryMailDomain).then(function (token) {
|
||||
if ("SecretQuestion" == vm.passwordRecovery.passwordRecoveryMode) {
|
||||
vm.passwordRecovery.passwordRecoveryToken = token;
|
||||
vm.loginState = 'passwordchange';
|
||||
} else if ("SecondaryEmail" == vm.passwordRecovery.passwordRecoveryMode) {
|
||||
vm.loginState = 'sendrecoverymail';
|
||||
}
|
||||
}, function (msg) {
|
||||
vm.loginState = 'error';
|
||||
vm.errorMessage = msg;
|
||||
});
|
||||
};
|
||||
|
||||
this.isInPasswordRecoveryMode = function () {
|
||||
return (("SecretQuestion" == this.passwordRecovery.passwordRecoveryMode ||
|
||||
"SecondaryEmail" == this.passwordRecovery.passwordRecoveryMode) &&
|
||||
this.passwordRecovery.passwordRecoveryToken) ? true : false;
|
||||
};
|
||||
|
||||
this.passwordRecoveryAbort = function () {
|
||||
this.passwords = { newPassword: null, newPasswordConfirmation: null, oldPassword: null };
|
||||
this.loginState = false;
|
||||
this.passwordRecovery.passwordRecoveryEnabled = false;
|
||||
this.passwordRecovery.passwordRecoveryQuestion = null;
|
||||
this.passwordRecovery.passwordRecoveryMode = null;
|
||||
this.passwordRecovery.passwordRecoveryQuestionAnswer = null;
|
||||
this.passwordRecovery.passwordRecoveryToken = null;
|
||||
this.passwordRecovery.passwordRecoverySecondaryEmailText = null;
|
||||
this.passwordRecovery.passwordRecoveryMailDomain = null;
|
||||
$window.location.href = vm.url;
|
||||
};
|
||||
|
||||
this.usernameChanged = function () {
|
||||
if (this.passwordRecovery.passwordRecoveryLinkTimer) {
|
||||
clearTimeout(this.passwordRecovery.passwordRecoveryLinkTimer);
|
||||
}
|
||||
|
||||
this.passwordRecovery.passwordRecoveryLinkTimer = setTimeout(() => {
|
||||
vm.retrievePasswordRecoveryEnabled();
|
||||
this.passwordRecovery.passwordRecoveryLinkTimer = null;
|
||||
}, PASSWORD_RECOVERY_TIMER_MS);
|
||||
};
|
||||
|
||||
this.retrievePasswordRecoveryEnabled = function () {
|
||||
if (this.creds.username || this.creds.domain) {
|
||||
Authentication.passwordRecoveryEnabled(this.creds.username, this.creds.domain).then(function (mailDomain) {
|
||||
vm.passwordRecovery.passwordRecoveryMailDomain = mailDomain;
|
||||
vm.passwordRecovery.passwordRecoveryEnabled = true;
|
||||
}, function () {
|
||||
vm.passwordRecovery.passwordRecoveryEnabled = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
angular
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"Preferences.js","sources":["Preferences/Preferences.app.js","Preferences/AccountDialogController.js","Preferences/FiltersDialogController.js","Preferences/PreferencesController.js"],"names":["configure","$stateProvider","$urlServiceProvider","state","abstract","views","preferences","templateUrl","controller","controllerAs","url","module","rules","otherwise","runBlock","$window","$log","$transitions","$state","DebugEnabled","defaultErrorHandler","onError","to","transition","name","ignored","error","detail","go","angular","config","run","$inject","AccountDialogController","$timeout","$mdDialog","FileUploader","Dialog","Settings","defaults","account","accountId","mailCustomFromEnabled","vm","this","usesSSO","usesCASAuthentication","usesSAML2Authentication","_loadCertificate","security","hasCertificate","$certificate","then","crt","certificate","filterByExtension","item","isP12File","type","indexOf","test","form","certificateFilename","$setValidity","defaultPort","hostnameRE","emailRE","String","addressesSearchText","ckConfig","autoGrow_minHeight","toolbar","language","ckLocaleCode","encryption","uploader","activeUser","join","autoUpload","queueLimit","filters","fn","onAfterAddingFile","file","onSuccessItem","response","status","headers","clearQueue","_","assign","$$certificate","onErrorItem","alert","l","hasIdentities","filter","identities","isEditableIdentity","length","identity","isReadOnly","selectIdentity","index","selectedIdentity","hasDefaultIdentity","findIndex","isDefault","setDefaultIdentity","$event","$index","forEach","i","stopPropagation","canRemoveIdentity","removeIdentity","splice","addIdentity","firstReadonlyIndex","customFromIsReadonly","fullName","Math","max","showCkEditor","SOGoMailComposeMessageType","filterEmailAddresses","$query","defaultEmailAddresses","address","toLowerCase","importCertificate","queue","formData","password","certificatePassword","uploadItem","onBeforeUploadCertificate","removeCertificate","$removeCertificate","cancel","save","hide","FiltersDialogController","$scope","mailboxes","labels","validateForwardAddress","Preferences","sieveCapabilities","forwardEnabled","vacationEnabled","fieldLabels","subject","from","cc","to_or_cc","size","header","body","methodLabels","discard","keep","stop","redirect","reject","fileinto","addflag","methods","intersection","keys","numberOperatorLabels","under","over","textOperatorLabels","is","is_not","contains","contains_not","matches","matches_not","regex","regex_not","hasRulesAndActions","requirements","actions","match","push","every","a","invalid","method","action","argument","err","message","addMailFilterRule","event","field","operator","removeMailFilterRule","addMailFilterAction","removeMailFilterAction","PreferencesController","$q","$mdMedia","$mdSidenav","$mdToast","sgSettings","focus","User","Account","Authentication","Date","beginOfDay","_loadAllMailboxes","mail","id","$getMailboxes","allMailboxes","$flattenMailboxes","all","domain","domains","forwardConstraints","defaultAddresses","adr","split","Error","forwardConstraintsDomains","$onInit","passwords","newPassword","newPasswordConfirmation","oldPassword","timeZonesList","timeZonesSearchText","mailLabelKeyRE","RegExp","emailSeparatorKeys","SOGoMailAutoMarkAsReadMode","mailAutoMarkAsReadDelay","SOGoMailAutoMarkAsReadDelay","SOGoAlternateAvatar","$alternateAvatar","sieveVariablesCapability","hasActiveExternalSieveScripts","updateVacationDates","$valid","close","onLanguageChange","confirm","ok","quick","location","reload","onDesktopNotificationsChange","SOGoDesktopNotifications","authorizeNotifications","resetContactsCategories","SOGoContactsCategories","defaultContactsCategories","$setDirty","resetCalendarCategories","SOGoCalendarCategories","defaultCalendarCategories","SOGoCalendarCategoriesColorsValues","values","addCalendarCategory","resetCalendarCategoryValidity","removeCalendarCategory","addContactCategory","removeContactCategory","onMailAutoMarkAsReadDelay","addMailAccount","ev","AuxiliaryMailAccounts","isNew","email","receipts","receiptAction","receiptNonRecipientAction","receiptOutsideDomainAction","receiptAnyAction","show","targetEvent","locals","isArray","settings","Mail","ExpandedFolders","$omit","editMailAccount","data","cloneDeep","catch","noop","removeMailAccount","resetMailLabelValidity","addMailLabel","guid","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","removeMailLabel","addMailFilter","active","SOGoMailLabelsColors","SOGoSieveFilters","editMailFilter","copy","removeMailFilter","onFiltersOrderChanged","_onFiltersOrderChanged","difference","Vacation","autoReplyEmailAddresses","addDefaultEmailAddresses","v","isDefined","union","userFilter","search","excludedUsers","minimumSearchLength","$filter","users","user","$$image","image","avatar","c_email","no_404","manageSieveScript","confirmChanges","target","$dirty","preventDefault","tagName","parentNode","href","options","addresses","sendForm","Forward","enabled","forwardAddress","uniq","value",Line truncated
|
||||
{"version":3,"file":"Preferences.js","sources":["Preferences/Preferences.app.js","Preferences/AccountDialogController.js","Preferences/FiltersDialogController.js","Preferences/PreferencesController.js"],"names":["configure","$stateProvider","$urlServiceProvider","state","abstract","views","preferences","templateUrl","controller","controllerAs","url","module","rules","otherwise","runBlock","$window","$log","$transitions","$state","DebugEnabled","defaultErrorHandler","onError","to","transition","name","ignored","error","detail","go","angular","config","run","$inject","AccountDialogController","$timeout","$mdDialog","FileUploader","Dialog","Settings","defaults","account","accountId","mailCustomFromEnabled","vm","this","usesSSO","usesCASAuthentication","usesSAML2Authentication","_loadCertificate","security","hasCertificate","$certificate","then","crt","certificate","filterByExtension","item","isP12File","type","indexOf","test","form","certificateFilename","$setValidity","defaultPort","hostnameRE","emailRE","String","addressesSearchText","ckConfig","autoGrow_minHeight","toolbar","language","ckLocaleCode","encryption","uploader","activeUser","join","autoUpload","queueLimit","filters","fn","onAfterAddingFile","file","onSuccessItem","response","status","headers","clearQueue","_","assign","$$certificate","onErrorItem","alert","l","hasIdentities","filter","identities","isEditableIdentity","length","identity","isReadOnly","selectIdentity","index","selectedIdentity","hasDefaultIdentity","findIndex","isDefault","setDefaultIdentity","$event","$index","forEach","i","stopPropagation","canRemoveIdentity","removeIdentity","splice","addIdentity","firstReadonlyIndex","customFromIsReadonly","fullName","Math","max","showCkEditor","SOGoMailComposeMessageType","filterEmailAddresses","$query","defaultEmailAddresses","address","toLowerCase","importCertificate","queue","formData","password","certificatePassword","uploadItem","onBeforeUploadCertificate","removeCertificate","$removeCertificate","cancel","save","hide","FiltersDialogController","$scope","mailboxes","labels","validateForwardAddress","Preferences","sieveCapabilities","forwardEnabled","vacationEnabled","fieldLabels","subject","from","cc","to_or_cc","size","header","body","methodLabels","discard","keep","stop","redirect","reject","fileinto","addflag","methods","intersection","keys","numberOperatorLabels","under","over","textOperatorLabels","is","is_not","contains","contains_not","matches","matches_not","regex","regex_not","hasRulesAndActions","requirements","actions","match","push","every","a","invalid","method","action","argument","err","message","addMailFilterRule","event","field","operator","removeMailFilterRule","addMailFilterAction","removeMailFilterAction","PreferencesController","$q","$mdMedia","$mdSidenav","$mdToast","sgSettings","focus","User","Account","Authentication","Date","beginOfDay","_loadAllMailboxes","mail","id","$getMailboxes","allMailboxes","$flattenMailboxes","all","domain","domains","forwardConstraints","defaultAddresses","adr","split","Error","forwardConstraintsDomains","$onInit","passwords","newPassword","newPasswordConfirmation","oldPassword","timeZonesList","timeZonesSearchText","mailLabelKeyRE","RegExp","emailSeparatorKeys","SOGoMailAutoMarkAsReadMode","mailAutoMarkAsReadDelay","SOGoMailAutoMarkAsReadDelay","SOGoAlternateAvatar","$alternateAvatar","sieveVariablesCapability","hasActiveExternalSieveScripts","updateVacationDates","$valid","close","onLanguageChange","confirm","ok","quick","location","reload","onDesktopNotificationsChange","SOGoDesktopNotifications","authorizeNotifications","resetContactsCategories","SOGoContactsCategories","defaultContactsCategories","$setDirty","resetCalendarCategories","SOGoCalendarCategories","defaultCalendarCategories","SOGoCalendarCategoriesColorsValues","values","addCalendarCategory","resetCalendarCategoryValidity","removeCalendarCategory","addContactCategory","removeContactCategory","onMailAutoMarkAsReadDelay","addMailAccount","ev","AuxiliaryMailAccounts","isNew","email","receipts","receiptAction","receiptNonRecipientAction","receiptOutsideDomainAction","receiptAnyAction","show","targetEvent","locals","isArray","settings","Mail","ExpandedFolders","$omit","editMailAccount","data","cloneDeep","catch","noop","removeMailAccount","resetMailLabelValidity","addMailLabel","guid","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","removeMailLabel","addMailFilter","active","SOGoMailLabelsColors","SOGoSieveFilters","editMailFilter","copy","removeMailFilter","onFiltersOrderChanged","_onFiltersOrderChanged","difference","Vacation","autoReplyEmailAddresses","addDefaultEmailAddresses","v","isDefined","union","userFilter","search","excludedUsers","minimumSearchLength","$filter","users","user","$$image","image","avatar","c_email","no_404","manageSieveScript","confirmChanges","target","$dirty","preventDefault","tagName","parentNode","href","options","addresses","sendForm","Forward","enabled","forwardAddress","uniq","value",Line truncated
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function p(){var e,t,a,o,n=this;if(this.nextAlarm=null,this.nextInboxPoll=null,this.currentToast=p.$q.when(!0),this.lastUid=null,this.notifications={},this.defaults={},this.settings={Mail:{}},e=p.$document[0].getElementById("UserDefaults")){try{t=angular.fromJson(e.textContent||e.innerHTML)}catch(e){p.$log.error("Can't parse user's defaults: "+e.message),t={}}if(t.SOGoMailLabelsColorsKeys=[],t.SOGoMailLabelsColorsValues=[],_.forEach(t.SOGoMailLabelsColors,function(e,a){t.SOGoMailLabelsColorsKeys.push(a),t.SOGoMailLabelsColorsValues.push(e),"$"==a.charAt(0)&&(Object.defineProperty(t.SOGoMailLabelsColors,"_"+a,Object.getOwnPropertyDescriptor(t.SOGoMailLabelsColors,a)),delete t.SOGoMailLabelsColors[a])}),_.forEach(t.SOGoSieveFilters,function(e){_.forEach(e.actions,function(e){"addflag"==e.method&&"$"==e.argument.charAt(0)&&(e.argument="_"+e.argument)})}),t.SOGoRememberLastModule&&(t.SOGoLoginModule="Last"),t.SOGoMailAutoMarkAsReadDelay=parseInt(t.SOGoMailAutoMarkAsReadDelay)||0,t.SOGoMailAutoMarkAsReadEnabled=0<=t.SOGoMailAutoMarkAsReadDelay,0<t.SOGoMailAutoMarkAsReadDelay?t.SOGoMailAutoMarkAsReadMode="delay":t.SOGoMailAutoMarkAsReadMode="immediate",t.SOGoMailAutoSave=parseInt(t.SOGoMailAutoSave)||0,t.SOGoMailComposeWindowEnabled=angular.isDefined(t.SOGoMailComposeWindow),t.SOGoMailComposeFontSizeEnabled=0<parseInt(t.SOGoMailComposeFontSize),window.CKEDITOR&&t.SOGoMailComposeFontSizeEnabled&&(window.CKEDITOR.config.fontSize_defaultLabel=t.SOGoMailComposeFontSize,window.CKEDITOR.addCss(".cke_editable { font-size: "+t.SOGoMailComposeFontSize+"px; }")),_.forEach(t.AuxiliaryMailAccounts,function(e){isNaN(parseInt(e.port))&&(e.port=null)}),t.Vacation?(t.Vacation.startDate&&(t.Vacation.startDate=new Date(1e3*parseInt(t.Vacation.startDate))),t.Vacation.endDate&&(t.Vacation.endDate=new Date(1e3*parseInt(t.Vacation.endDate))),t.Vacation.startTime&&(a=t.Vacation.startTime.split(":"),t.Vacation.startTime=new Date,t.Vacation.startTime.setHours(parseInt(a[0]),parseInt(a[1]))),t.Vacation.endTime&&(a=t.Vacation.endTime.split(":"),t.Vacation.endTime=new Date,t.Vacation.endTime.setHours(parseInt(a[0]),parseInt(a[1]))),t.Vacation.autoReplyEmailAddresses&&angular.isString(t.Vacation.autoReplyEmailAddresses)&&t.Vacation.autoReplyEmailAddresses.length&&(t.Vacation.autoReplyEmailAddresses=t.Vacation.autoReplyEmailAddresses.split(/, */))):t.Vacation={},angular.isUndefined(t.Vacation.days)&&(t.Vacation.days=[]),(angular.isUndefined(t.Vacation.autoReplyEmailAddresses)||0==t.Vacation.autoReplyEmailAddresses.length)&&angular.isDefined(window.defaultEmailAddresses)&&(t.Vacation.autoReplyEmailAddresses=window.defaultEmailAddresses.slice()),angular.isUndefined(t.Vacation.daysBetweenResponse)&&(t.Vacation.daysBetweenResponse=7),!angular.isUndefined(t.Vacation.startDate)&&t.Vacation.startDate||(t.Vacation.startDateEnabled=0,t.Vacation.startDate=new Date,t.Vacation.startDate=t.Vacation.startDate.beginOfDay(),t.Vacation.startDate.addDays(1)),!angular.isUndefined(t.Vacation.endDate)&&t.Vacation.endDate||(t.Vacation.endDateEnabled=0,t.Vacation.endDate=new Date(t.Vacation.startDate.getTime()),t.Vacation.endDate.addDays(1)),!angular.isUndefined(t.Vacation.startTime)&&t.Vacation.startTime||(t.Vacation.startTimeEnabled=0,t.Vacation.startTime=new Date,t.Vacation.startTime.setHours(parseInt(t.SOGoDayEndTime)),t.Vacation.startTime.setMinutes(0)),!angular.isUndefined(t.Vacation.endTime)&&t.Vacation.endTime||(t.Vacation.endTimeEnabled=0,t.Vacation.endTime=new Date,t.Vacation.endTime.setHours(parseInt(t.SOGoDayStartTime)),t.Vacation.endTime.setMinutes(0)),t.Forward&&(angular.isString(t.Forward.forwardAddress)?t.Forward.forwardAddress=t.Forward.forwardAddress.split(/, */):angular.isArray(t.Forward.forwardAddress)||(t.Forward.forwardAddress=[])),angular.isUndefined(t.SOGoCalendarCategories)&&(t.SOGoCalendarCategories=[]),t.SOGoCalendarCategoriesColorsValues=[],_.forEach(t.SOGoCalendarCategories,function(e){t.SOGoCalendarCategoriesColorsValues.push(t.SOGoCalendarCategoriesColors[e])}),angular.isUndefined(t.SOGoContactsCategories)?t.SOGoContactsCategories=[]:t.SOGoContactsCategories=_.compact(t.SOGoContactsCategories),t.emailSeparatorKeys=[9,13,186,188],t.LocaleCode)switch(t.ckLocaleCode=t.LocaleCode.replace("_","-").toLowerCase(),t.LocaleCode){case"it":t.emailSeparatorKeys=[9,13,188];break;case"ru":t.emailSeparatorKeys=[9,13];break;case"sr_ME":case"sr_RS":t.ckLocaleCode="sr-latn"}angular.extend(n.defaults,t),n.$mdDateLocaleProvider=p.$mdDateLocaleProvider,angular.extend(n.$mdDateLocaleProvider,t.locale),angular.extend(n.$mdDateLocaleProvider,{firstDayOfWeek:t.SOGoFirstDayOfWeek,firstWeekOfYear:t.SOGoFirstWeekOfYear}),n.$mdDateLocaleProvider.firstDayOfWeek=parseInt(t.SOGoFirstDayOfWeek),n.$mdDateLocaleProvider.weekNumberFormatter=function(e){return l("Week %d",e)},n.$mdDateLocaleProvider.msgCalendar=l("Calendar"),n.$mdDateLocaleProvider.msgOpenCalendar=l("Open Calendar"),n.$mdDateLocaleProvider.parseDate=function(e){return e?e.parseDLine truncated
|
||||
!function(){"use strict";function p(){var e,t,a,o,n=this;if(this.nextAlarm=null,this.nextInboxPoll=null,this.currentToast=p.$q.when(!0),this.lastUid=null,this.notifications={},this.defaults={},this.settings={Mail:{}},e=p.$document[0].getElementById("UserDefaults")){try{t=angular.fromJson(e.textContent||e.innerHTML)}catch(e){p.$log.error("Can't parse user's defaults: "+e.message),t={}}if(t.SOGoMailLabelsColorsKeys=[],t.SOGoMailLabelsColorsValues=[],_.forEach(t.SOGoMailLabelsColors,function(e,a){t.SOGoMailLabelsColorsKeys.push(a),t.SOGoMailLabelsColorsValues.push(e),"$"==a.charAt(0)&&(Object.defineProperty(t.SOGoMailLabelsColors,"_"+a,Object.getOwnPropertyDescriptor(t.SOGoMailLabelsColors,a)),delete t.SOGoMailLabelsColors[a])}),_.forEach(t.SOGoSieveFilters,function(e){_.forEach(e.actions,function(e){"addflag"==e.method&&"$"==e.argument.charAt(0)&&(e.argument="_"+e.argument)})}),t.SOGoRememberLastModule&&(t.SOGoLoginModule="Last"),t.SOGoMailAutoMarkAsReadDelay=parseInt(t.SOGoMailAutoMarkAsReadDelay)||0,t.SOGoMailAutoMarkAsReadEnabled=0<=t.SOGoMailAutoMarkAsReadDelay,0<t.SOGoMailAutoMarkAsReadDelay?t.SOGoMailAutoMarkAsReadMode="delay":t.SOGoMailAutoMarkAsReadMode="immediate",t.SOGoMailAutoSave=parseInt(t.SOGoMailAutoSave)||0,t.SOGoMailComposeWindowEnabled=angular.isDefined(t.SOGoMailComposeWindow),t.SOGoMailComposeFontSizeEnabled=0<parseInt(t.SOGoMailComposeFontSize),window.CKEDITOR&&t.SOGoMailComposeFontSizeEnabled&&(window.CKEDITOR.config.fontSize_defaultLabel=t.SOGoMailComposeFontSize,window.CKEDITOR.addCss(".cke_editable { font-size: "+t.SOGoMailComposeFontSize+"px; }")),_.forEach(t.AuxiliaryMailAccounts,function(e){isNaN(parseInt(e.port))&&(e.port=null)}),t.Vacation?(t.Vacation.startDate&&(t.Vacation.startDate=new Date(1e3*parseInt(t.Vacation.startDate))),t.Vacation.endDate&&(t.Vacation.endDate=new Date(1e3*parseInt(t.Vacation.endDate))),t.Vacation.startTime&&(a=t.Vacation.startTime.split(":"),t.Vacation.startTime=new Date,t.Vacation.startTime.setHours(parseInt(a[0]),parseInt(a[1]))),t.Vacation.endTime&&(a=t.Vacation.endTime.split(":"),t.Vacation.endTime=new Date,t.Vacation.endTime.setHours(parseInt(a[0]),parseInt(a[1]))),t.Vacation.autoReplyEmailAddresses&&angular.isString(t.Vacation.autoReplyEmailAddresses)&&t.Vacation.autoReplyEmailAddresses.length&&(t.Vacation.autoReplyEmailAddresses=t.Vacation.autoReplyEmailAddresses.split(/, */))):t.Vacation={},angular.isUndefined(t.Vacation.days)&&(t.Vacation.days=[]),(angular.isUndefined(t.Vacation.autoReplyEmailAddresses)||0==t.Vacation.autoReplyEmailAddresses.length)&&angular.isDefined(window.defaultEmailAddresses)&&(t.Vacation.autoReplyEmailAddresses=window.defaultEmailAddresses.slice()),angular.isUndefined(t.Vacation.daysBetweenResponse)&&(t.Vacation.daysBetweenResponse=7),!angular.isUndefined(t.Vacation.startDate)&&t.Vacation.startDate||(t.Vacation.startDateEnabled=0,t.Vacation.startDate=new Date,t.Vacation.startDate=t.Vacation.startDate.beginOfDay(),t.Vacation.startDate.addDays(1)),!angular.isUndefined(t.Vacation.endDate)&&t.Vacation.endDate||(t.Vacation.endDateEnabled=0,t.Vacation.endDate=new Date(t.Vacation.startDate.getTime()),t.Vacation.endDate.addDays(1)),!angular.isUndefined(t.Vacation.startTime)&&t.Vacation.startTime||(t.Vacation.startTimeEnabled=0,t.Vacation.startTime=new Date,t.Vacation.startTime.setHours(parseInt(t.SOGoDayEndTime)),t.Vacation.startTime.setMinutes(0)),!angular.isUndefined(t.Vacation.endTime)&&t.Vacation.endTime||(t.Vacation.endTimeEnabled=0,t.Vacation.endTime=new Date,t.Vacation.endTime.setHours(parseInt(t.SOGoDayStartTime)),t.Vacation.endTime.setMinutes(0)),t.Forward&&(angular.isString(t.Forward.forwardAddress)?t.Forward.forwardAddress=t.Forward.forwardAddress.split(/, */):angular.isArray(t.Forward.forwardAddress)||(t.Forward.forwardAddress=[])),angular.isUndefined(t.SOGoCalendarCategories)&&(t.SOGoCalendarCategories=[]),t.SOGoCalendarCategoriesColorsValues=[],_.forEach(t.SOGoCalendarCategories,function(e){t.SOGoCalendarCategoriesColorsValues.push(t.SOGoCalendarCategoriesColors[e])}),angular.isUndefined(t.SOGoContactsCategories)?t.SOGoContactsCategories=[]:t.SOGoContactsCategories=_.compact(t.SOGoContactsCategories),t.emailSeparatorKeys=[9,13,186,188],t.LocaleCode)switch(t.ckLocaleCode=t.LocaleCode.replace("_","-").toLowerCase(),t.LocaleCode){case"it":t.emailSeparatorKeys=[9,13,188];break;case"ru":t.emailSeparatorKeys=[9,13];break;case"sr_ME":case"sr_RS":t.ckLocaleCode="sr-latn"}angular.extend(n.defaults,t),n.$mdDateLocaleProvider=p.$mdDateLocaleProvider,angular.extend(n.$mdDateLocaleProvider,t.locale),angular.extend(n.$mdDateLocaleProvider,{firstDayOfWeek:t.SOGoFirstDayOfWeek,firstWeekOfYear:t.SOGoFirstWeekOfYear}),n.$mdDateLocaleProvider.firstDayOfWeek=parseInt(t.SOGoFirstDayOfWeek),n.$mdDateLocaleProvider.weekNumberFormatter=function(e){return l("Week %d",e)},n.$mdDateLocaleProvider.msgCalendar=l("Calendar"),n.$mdDateLocaleProvider.msgOpenCalendar=l("Open Calendar"),n.$mdDateLocaleProvider.parseDate=function(e){return e?e.parseDLine truncated
|
||||
//# sourceMappingURL=Preferences.services.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"Preferences.services.js","sources":["Preferences/Preferences.service.js"],"names":["Preferences","settingsElement","data","time","reloadPromises","_this","this","nextAlarm","nextInboxPoll","currentToast","$q","when","lastUid","notifications","defaults","settings","Mail","defaultsElement","$document","getElementById","angular","fromJson","textContent","innerHTML","e","$log","error","message","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","_","forEach","SOGoMailLabelsColors","value","key","push","charAt","Object","defineProperty","getOwnPropertyDescriptor","SOGoSieveFilters","filter","actions","action","method","argument","SOGoRememberLastModule","SOGoLoginModule","SOGoMailAutoMarkAsReadDelay","parseInt","SOGoMailAutoMarkAsReadEnabled","SOGoMailAutoMarkAsReadMode","SOGoMailAutoSave","SOGoMailComposeWindowEnabled","isDefined","SOGoMailComposeWindow","SOGoMailComposeFontSizeEnabled","SOGoMailComposeFontSize","window","CKEDITOR","config","fontSize_defaultLabel","addCss","AuxiliaryMailAccounts","mailAccount","isNaN","port","Vacation","startDate","Date","endDate","startTime","split","setHours","endTime","autoReplyEmailAddresses","isString","length","isUndefined","days","defaultEmailAddresses","slice","daysBetweenResponse","startDateEnabled","beginOfDay","addDays","endDateEnabled","getTime","startTimeEnabled","SOGoDayEndTime","setMinutes","endTimeEnabled","SOGoDayStartTime","Forward","forwardAddress","isArray","SOGoCalendarCategories","SOGoCalendarCategoriesColorsValues","SOGoCalendarCategoriesColors","SOGoContactsCategories","compact","emailSeparatorKeys","LocaleCode","ckLocaleCode","replace","toLowerCase","extend","$mdDateLocaleProvider","locale","firstDayOfWeek","SOGoFirstDayOfWeek","firstWeekOfYear","SOGoFirstWeekOfYear","weekNumberFormatter","weekNumber","l","msgCalendar","msgOpenCalendar","parseDate","dateString","SOGoShortDateFormat","NaN","formatDate","date","format","$dateFormat","parseTime","timeString","SOGoTimeFormat","formatTime","isDateComplete","trim","test","Calendar","ReloadWebCalendars","AutoReloadedWebCalendars","map","autoReload","id","calendarId","deferred","defer","$$resource","quietFetch","finally","resolve","promise","all","then","save","$omit","$rootScope","$emit","PreventInvitationsWhitelist","match","exec","user","$User","uid","cn","c_email","$$image","avatar","no_404","$factory","$window","$timeout","$state","$mdToast","sgConstant","Settings","Gravatar","Resource","User","$toast","$gravatar","activeUser","$resourcesURL","resourcesURL","$sgConstant","module","factory","prototype","ready","warn","email","size","options","alternate_avatar","SOGoAlternateAvatar","url","SOGoGravatarEnabled","join","dstObject","dstAttr","hasActiveExternalSieveScripts","response","status","supportsNotifications","Notification","authorizeNotifications","requestPermission","permission","createNotification","title","params","pick","tag","lang","dir","onclick","onClick","close","viewInboxMessage","get","go","accountId","mailboxId","messageId","location","path","pollInbox","toastController","scope","body","hide","sortingAttributes","sort","asc","noHeaders","dry","filters","searchBy","searchInput","cancel","inboxSyncToken","syncToken","$inject","post","debug","headers","uidHeaderIndex","indexOf","isReadHeaderIndex","fromHeaderIndex","subjectHeaderIndex","showToast","show","locals","i","toast","SOGoDesktopNotifications","href","name","icon","bind","template","position","toastPosition","hideDelay","controller","refreshViewCheck","SOGoRefreshViewCheck","timeInterval","getAlarms","now","browserTime","Math","floor","fetch","delay","f","alarms","a","b","x","next","pop","utc","alarmTime","showAlarm","today","day","asDate","period","AlarmController","summary","reminder","snooze","localizedStartDate","localizedEndDate","isAllDay","localizedStartTime","localizedEndTime","view","getDayString","$save","deep","preferences","whitelist","copy","substring","account","identities","identity","isReadOnly","$shortFormat"],"mappings":"CAEA,wBAQE,SAASA,IACP,IAAmCC,EAAiBC,EAAMC,EA8OhDC,EA9ONC,EAAQC,KAYZ,GAVAA,KAAKC,UAAY,KACjBD,KAAKE,cAAgB,KACrBF,KAAKG,aAAeT,EAAYU,GAAGC,MAAK,GACxCL,KAAKM,QAAU,KACfN,KAAKO,cAAgB,GAErBP,KAAKQ,SAAW,GAChBR,KAAKS,SAAW,CAACC,KAAM,IAEvBC,EAAkBjB,EAAYkB,UAAU,GAAGC,eAAe,gBACrC,CACnB,IACEjB,EAAOkB,QAAQC,SAASJ,EAAgBK,aAAeL,EAAgBM,WACvE,MAAOC,GACPxB,EAAYyB,KAAKC,MAAM,gCAAkCF,EAAEG,SAC3DzB,EAAO,GA+IT,GA3IAA,EAAK0B,yBAA2B,GAChC1B,EAAK2B,2BAA6B,GAClCC,EAAEC,QAAQ7B,EAAK8B,qBAAsB,SAAUC,EAAOC,GACpDhC,EAAK0B,yBAAyBO,KAAKD,GACnChC,EAAK2B,2BAA2BM,KAAKF,GAChB,KAAjBC,EAAIE,OAAO,KACbC,OAAOC,eAAepC,EAAK8B,qBAAsB,IAAME,EACjCG,OAAOE,yBAAyBrC,EAAK8B,qBAAsBE,WAC1EhC,EAAK8B,qBAAqBE,MAIrCJ,EAAEC,QAAQ7B,EAAKsC,iBAAkB,SAASC,GACxCX,EAAEC,QAAQU,EAAOC,QAAS,SAASC,GACZ,WAAjBA,EAAOC,QACsB,KAA7BD,EAAOE,SAAST,OAAO,KACzBO,EAAOE,SAAW,IAAMF,EAAOE,cAIjC3C,EAAK4C,yBACP5C,EAAK6C,gBAAkB,QAEzB7C,EAAK8C,4BAA8BC,SAAS/C,EAAK8C,8BAAgC,EACjF9C,EAAKgD,8BAAqE,GAApChD,EAAK8C,4BACJ,EAAnC9C,EAAK8C,4BACP9C,EAAKiD,2BAA6B,QAElCjD,EAAKiD,2Line truncated
|
||||
{"version":3,"file":"Preferences.services.js","sources":["Preferences/Preferences.service.js"],"names":["Preferences","settingsElement","data","time","reloadPromises","_this","this","nextAlarm","nextInboxPoll","currentToast","$q","when","lastUid","notifications","defaults","settings","Mail","defaultsElement","$document","getElementById","angular","fromJson","textContent","innerHTML","e","$log","error","message","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","_","forEach","SOGoMailLabelsColors","value","key","push","charAt","Object","defineProperty","getOwnPropertyDescriptor","SOGoSieveFilters","filter","actions","action","method","argument","SOGoRememberLastModule","SOGoLoginModule","SOGoMailAutoMarkAsReadDelay","parseInt","SOGoMailAutoMarkAsReadEnabled","SOGoMailAutoMarkAsReadMode","SOGoMailAutoSave","SOGoMailComposeWindowEnabled","isDefined","SOGoMailComposeWindow","SOGoMailComposeFontSizeEnabled","SOGoMailComposeFontSize","window","CKEDITOR","config","fontSize_defaultLabel","addCss","AuxiliaryMailAccounts","mailAccount","isNaN","port","Vacation","startDate","Date","endDate","startTime","split","setHours","endTime","autoReplyEmailAddresses","isString","length","isUndefined","days","defaultEmailAddresses","slice","daysBetweenResponse","startDateEnabled","beginOfDay","addDays","endDateEnabled","getTime","startTimeEnabled","SOGoDayEndTime","setMinutes","endTimeEnabled","SOGoDayStartTime","Forward","forwardAddress","isArray","SOGoCalendarCategories","SOGoCalendarCategoriesColorsValues","SOGoCalendarCategoriesColors","SOGoContactsCategories","compact","emailSeparatorKeys","LocaleCode","ckLocaleCode","replace","toLowerCase","extend","$mdDateLocaleProvider","locale","firstDayOfWeek","SOGoFirstDayOfWeek","firstWeekOfYear","SOGoFirstWeekOfYear","weekNumberFormatter","weekNumber","l","msgCalendar","msgOpenCalendar","parseDate","dateString","SOGoShortDateFormat","NaN","formatDate","date","format","$dateFormat","parseTime","timeString","SOGoTimeFormat","formatTime","isDateComplete","trim","test","Calendar","ReloadWebCalendars","AutoReloadedWebCalendars","map","autoReload","id","calendarId","deferred","defer","$$resource","quietFetch","finally","resolve","promise","all","then","save","$omit","$rootScope","$emit","PreventInvitationsWhitelist","match","exec","user","$User","uid","cn","c_email","$$image","avatar","no_404","$factory","$window","$timeout","$state","$mdToast","sgConstant","Settings","Gravatar","Resource","User","$toast","$gravatar","activeUser","$resourcesURL","resourcesURL","$sgConstant","module","factory","prototype","ready","warn","email","size","options","alternate_avatar","SOGoAlternateAvatar","url","SOGoGravatarEnabled","join","dstObject","dstAttr","hasActiveExternalSieveScripts","response","status","supportsNotifications","Notification","isItemSecretQuestion","SOGoPasswordRecoveryMode","isItemSecondaryEmail","authorizeNotifications","requestPermission","permission","createNotification","title","params","pick","tag","lang","dir","onclick","onClick","close","viewInboxMessage","get","go","accountId","mailboxId","messageId","location","path","pollInbox","toastController","scope","body","hide","sortingAttributes","sort","asc","noHeaders","dry","filters","searchBy","searchInput","cancel","inboxSyncToken","syncToken","$inject","post","debug","headers","uidHeaderIndex","indexOf","isReadHeaderIndex","fromHeaderIndex","subjectHeaderIndex","showToast","show","locals","i","toast","SOGoDesktopNotifications","href","name","icon","bind","template","position","toastPosition","hideDelay","controller","refreshViewCheck","SOGoRefreshViewCheck","timeInterval","getAlarms","now","browserTime","Math","floor","fetch","delay","f","alarms","a","b","x","next","pop","utc","alarmTime","showAlarm","today","day","asDate","period","AlarmController","summary","reminder","snooze","localizedStartDate","localizedEndDate","isAllDay","localizedStartTime","localizedEndTime","view","getDayString","$save","deep","preferences","whitelist","copy","substring","account","identities","identity","isReadOnly","$shortFormat"],"mappings":"CAEA,wBAQE,SAASA,IACP,IAAmCC,EAAiBC,EAAMC,EA8OhDC,EA9ONC,EAAQC,KAYZ,GAVAA,KAAKC,UAAY,KACjBD,KAAKE,cAAgB,KACrBF,KAAKG,aAAeT,EAAYU,GAAGC,MAAK,GACxCL,KAAKM,QAAU,KACfN,KAAKO,cAAgB,GAErBP,KAAKQ,SAAW,GAChBR,KAAKS,SAAW,CAACC,KAAM,IAEvBC,EAAkBjB,EAAYkB,UAAU,GAAGC,eAAe,gBACrC,CACnB,IACEjB,EAAOkB,QAAQC,SAASJ,EAAgBK,aAAeL,EAAgBM,WACvE,MAAOC,GACPxB,EAAYyB,KAAKC,MAAM,gCAAkCF,EAAEG,SAC3DzB,EAAO,GA+IT,GA3IAA,EAAK0B,yBAA2B,GAChC1B,EAAK2B,2BAA6B,GAClCC,EAAEC,QAAQ7B,EAAK8B,qBAAsB,SAAUC,EAAOC,GACpDhC,EAAK0B,yBAAyBO,KAAKD,GACnChC,EAAK2B,2BAA2BM,KAAKF,GAChB,KAAjBC,EAAIE,OAAO,KACbC,OAAOC,eAAepC,EAAK8B,qBAAsB,IAAME,EACjCG,OAAOE,yBAAyBrC,EAAK8B,qBAAsBE,WAC1EhC,EAAK8B,qBAAqBE,MAIrCJ,EAAEC,QAAQ7B,EAAKsC,iBAAkB,SAASC,GACxCX,EAAEC,QAAQU,EAAOC,QAAS,SAASC,GACZ,WAAjBA,EAAOC,QACsB,KAA7BD,EAAOE,SAAST,OAAO,KACzBO,EAAOE,SAAW,IAAMF,EAAOE,cAIjC3C,EAAK4C,yBACP5C,EAAK6C,gBAAkB,QAEzB7C,EAAK8C,4BAA8BC,SAAS/C,EAAK8C,8BAAgC,EACjF9C,EAAKgD,8BAAqE,GLine truncated
|
||||
@@ -393,6 +393,26 @@
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @function isItemSecretQuestion
|
||||
* @memberof Preferences.prototype
|
||||
* @desc Check if the customer pick the secret question for e-mail recovery
|
||||
* @returns true if secret question is selected
|
||||
*/
|
||||
Preferences.prototype.isItemSecretQuestion = function() {
|
||||
return "SecretQuestion" == this.defaults.SOGoPasswordRecoveryMode;
|
||||
};
|
||||
|
||||
/**
|
||||
* @function isItemSecondaryEmail
|
||||
* @memberof Preferences.prototype
|
||||
* @desc Check if the customer pick the email for password recovery
|
||||
* @returns true if email is selected
|
||||
*/
|
||||
Preferences.prototype.isItemSecondaryEmail = function () {
|
||||
return "SecondaryEmail" == this.defaults.SOGoPasswordRecoveryMode;
|
||||
};
|
||||
|
||||
/**
|
||||
* @function authorizeNotifications
|
||||
* @memberof Preferences.prototype
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
this.onDesktopNotificationsChange = function() {
|
||||
if (this.preferences.defaults.SOGoDesktopNotifications)
|
||||
|
||||
Reference in new issue
Block a user