123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /**
- * Created by robin on 11/1/15.
- */
-
- (function () {
- 'use strict';
-
- angular.module('luticateAuth')
- .factory('luticateAuthCacheDataAccess', ['localStorageService', function (localStorageService) {
-
- var luticateAuthCache = {};
-
- luticateAuthCache.setUser = function(user)
- {
- localStorageService.set('lu_user', user);
- };
-
- luticateAuthCache.getUser = function()
- {
- return localStorageService.get('lu_user');
- };
-
- luticateAuthCache.removeUser = function()
- {
- localStorageService.remove('lu_user');
- };
-
- luticateAuthCache.setEffectivePermissions = function(permissions)
- {
- localStorageService.set('lu_effective_permissions', permissions);
- };
-
- luticateAuthCache.getEffectivePermissions = function()
- {
- return localStorageService.get('lu_effective_permissions');
- };
-
- luticateAuthCache.removeEffectivePermissions = function()
- {
- localStorageService.remove('lu_effective_permissions');
- };
-
- luticateAuthCache.setEffectiveSettings = function(settings)
- {
- localStorageService.set('lu_effective_settings', settings);
- };
-
- luticateAuthCache.getEffectiveSettings = function()
- {
- return localStorageService.get('lu_effective_settings');
- };
-
- luticateAuthCache.removeEffectiveSettings = function()
- {
- localStorageService.remove('lu_effective_settings');
- };
-
- return luticateAuthCache;
- }]);
- })();
|