session.js 454 Bytes
Newer Older
nabil el mahiri committed
1
!function(){"use strict";angular.module("access.session",[]).run(["$rootScope","$http","settings",function(a,b,c){function d(){b["delete"]("/sessions/mine").then(function(){window.location.href="/"})}function e(){window.location.href="/ngapps/user-profile"}var f=[];c.user?(f.push({label:"Profile",run:e},{label:"Logout",run:d}),a.user=c.user):f.push({label:"Login",href:"/ngapps/login#/?r="+encodeURIComponent(window.location.href)}),a.userMenu=f}])}();