Viewing File: /usr/local/cpanel/base/frontend/jupiter/mail/authentication/manage.cmb.min.js

define("app/services/manageService",["angular","cjt/io/api","cjt/io/uapi-request","cjt/io/uapi"],(function(e,t,r){var n=e.module("App");function i(e){var n={},i=[];return n.get_providers=function(){var n=e.defer(),i=new r.Class;return i.initialize("ExternalAuthentication","configured_modules"),t.promise(i.getRunArguments()).done((function(e){(e=e.parsedResponse).status?n.resolve(e):n.reject(e.error)})),n.promise},n.get_links=function(){return i},n.fetch_links=function(n){var a=e.defer(),o=new r.Class;return o.initialize("ExternalAuthentication","get_authn_links"),n&&o.addArgument("username",n),t.promise(o.getRunArguments()).done((function(e){(e=e.parsedResponse).status?a.resolve(e):a.reject(e.error)})),a.promise.then((function(e){i=e.data})),a.promise},n.unlink=function(n,i,a){var o=e.defer(),u=new r.Class;return u.initialize("ExternalAuthentication","remove_authn_link"),u.addArgument("provider_id",n),u.addArgument("subject_unique_identifier",i),u.addArgument("username",a),t.promise(u.getRunArguments()).done((function(e){(e=e.parsedResponse).status?o.resolve(e):o.reject(e.error)})),o.promise},n}return i.$inject=["$q"],n.factory("manageService",i)})),define("app/views/manageController",["angular","cjt/util/locale","uiBootstrap","cjt/directives/alertList","cjt/services/alertService"],(function(e,t){"use strict";return e.module("App").controller("manageController",["$scope","$routeParams","manageService","alertService",function(e,r,n,i){e.unlink=function(a,o){return n.unlink(a.provider_id,a.subject_unique_identifier,r.username).then((function(){n.fetch_links(r.username).then((function(){e.providers=n.get_links()}),(function(e){i.add({type:"danger",message:t.maketext("The system encountered an error while it tried to retrieve results, please refresh the interface: [_1]",e),closeable:!0,replace:!1,group:"emailExternalAuth"}),a.disabled=0})),i.add({type:"success",message:t.maketext("Successfully unlinked the “[_1]” account “[_2]”",o,a.preferred_username),closeable:!0,replace:!1,autoClose:1e4,group:"emailExternalAuth"})}),(function(e){i.add({type:"danger",message:t.maketext("The system encountered an error while it tried to retrieve results, please refresh the interface: [_1]",e),closeable:!0,replace:!1,group:"emailExternalAuth"}),a.disabled=0}))},e.init=function(){e.username=r.username,e.locale=t,e.providers=n.get_links()},e.init()}])})),define("app/manage",["angular","cjt/core","cjt/modules","uiBootstrap","ngRoute"],(function(e,t){"use strict";return function(){return e.module("App",["ui.bootstrap","cjt2.cpanel"]),require(["uiBootstrap","cjt/directives/alert","cjt/directives/alertList","cjt/services/alertService","app/services/manageService","app/views/manageController"],(function(){var r=e.module("App");r.controller("BaseController",["$rootScope","$scope","$route","$location","manageService","alertService",function(e,t,r,n,i,a){t.loading=!1,e.$on("$routeChangeStart",(function(){t.loading=!0})),e.$on("$routeChangeSuccess",(function(){t.loading=!1})),e.$on("$routeChangeError",(function(){t.loading=!1})),t.current_route_matches=function(e){return n.path().match(e)},t.go=function(e){n.path(e)},window.service=i}]),r.config(["$routeProvider","$locationProvider",function(e,r){e.when("/:username",{controller:"manageController",templateUrl:t.buildFullPath("mail/authentication/views/manageView.ptt"),resolve:{providers:["manageService","$route","alertService",function(e,t,r){return e.fetch_links(t.current.params.username).then((function(e){}),(function(e){r.add({type:"danger",message:LOCALE.maketext("The system encountered an error while it tried to retrieve results, please refresh the interface: [_1]",e),closeable:!0,replace:!1,group:"emailExternalAuth"})}))}]}}),e.otherwise({redirectTo:"/:username"})}]),r.init=function(){var t=e.element("#content");return null!==t[0]&&e.bootstrap(t[0],["App"]),r},r.init()}))}}));
Back to Directory File Manager