Browse Source

get effective permission

tags/0.1.0
Robin Thoni 8 years ago
parent
commit
3bfc1b8ac8
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      src/cache.js

+ 10
- 0
src/cache.js View File

@@ -45,6 +45,16 @@
45 45
                 return localStorageService.get('lu_effective_permissions');
46 46
             };
47 47
 
48
+            luticateAuthCache.hasEffectivePermissions = function(permission_name)
49
+            {
50
+                var permissions = luticateAuthCache.getEffectivePermissions();
51
+                if (permissions == null) {
52
+                    return null;
53
+                }
54
+                var value = permissions[permission_name];
55
+                return value == null ? null : value;
56
+            };
57
+
48 58
             luticateAuthCache.removeEffectivePermissions = function()
49 59
             {
50 60
                 localStorageService.remove('lu_effective_permissions');

Loading…
Cancel
Save