Github user timmak commented on a diff in the pull request: https://github.com/apache/couchdb-fauxton/pull/833#discussion_r100534561 --- Diff: app/addons/auth/base.js --- @@ -61,50 +71,16 @@ Auth.initialize = function () { className: 'logout' }); } else { - link = { - id: 'auth', - title: 'Login', - href: '#/login', - icon: 'fonticon-user', - bottomNav: true - }; FauxtonAPI.removeHeaderLink({ id: 'logout', footerNav: true }); } FauxtonAPI.updateHeaderLink(link); }); - Auth.session.fetchUser().then(function () { - Auth.session.trigger('change'); - }); - - var auth = function (session, roles) { - var deferred = $.Deferred(); - - if (session.isAdminParty()) { - session.trigger('authenticated'); - deferred.resolve(); - } else if (session.matchesRoles(roles)) { - session.trigger('authenticated'); - deferred.resolve(); - } else { - deferred.reject(); - } - - return [deferred]; - }; - - var authDenied = function () { - var url = window.location.hash.replace('#', ''); - var pattern = /login\?urlback=/g; - - if (pattern.test(url)) { - url = url.replace('login?urlback=', ''); - } - FauxtonAPI.navigate('/login?urlback=' + url, { replace: true }); - }; - - FauxtonAPI.auth.registerAuth(auth); - FauxtonAPI.auth.registerAuthDenied(authDenied); -}; - -export default Auth; + Auth.session.fetchUser().then(function () { + // debugger; + // Auth.session.trigger('change'); --- End diff -- There is no longer a trigger by setting the user the triggers a change
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---