Browse Source

typo

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
4b1b648349
2 changed files with 4 additions and 4 deletions
  1. 1
    1
      src/cache.js
  2. 3
    3
      src/users.js

+ 1
- 1
src/cache.js View File

45
                 return localStorageService.get('lu_effective_permissions');
45
                 return localStorageService.get('lu_effective_permissions');
46
             };
46
             };
47
 
47
 
48
-            luticateAuthCache.hasEffectivePermissions = function(permission_name)
48
+            luticateAuthCache.hasEffectivePermission = function(permission_name)
49
             {
49
             {
50
                 var permissions = luticateAuthCache.getEffectivePermissions();
50
                 var permissions = luticateAuthCache.getEffectivePermissions();
51
                 if (permissions == null) {
51
                 if (permissions == null) {

+ 3
- 3
src/users.js View File

41
                         .then(function(permissions)
41
                         .then(function(permissions)
42
                         {
42
                         {
43
                             var perms = {};
43
                             var perms = {};
44
-                            for (var i = 0; i < permissions.length; ++i) {
45
-                                var p = permissions[i];
44
+                            for (var i = 0; i < permissions.Data.length; ++i) {
45
+                                var p = permissions.Data[i];
46
                                 perms[p.Name] = p.Value;
46
                                 perms[p.Name] = p.Value;
47
                             }
47
                             }
48
                             luticateAuthCache.setEffectivePermissions(perms);
48
                             luticateAuthCache.setEffectivePermissions(perms);
49
-                            defer.resolve(permissions);
49
+                            defer.resolve(permissions.Data);
50
                         }, defer.reject);
50
                         }, defer.reject);
51
                     return defer.promise;
51
                     return defer.promise;
52
                 };
52
                 };

Loading…
Cancel
Save