Quantcast
Channel: DreamFactory Forum - Latest posts
Viewing all articles
Browse latest Browse all 5028

How to pick up the keys Lookup data created in the User table

$
0
0

I'm needing to create a user-level to control which users have access to a report button. I'm trying to do this with lookup_key the User table but I can not handle this lookup_key. I am using the getUser function, but without success, following my job:

     $ scope. $ on ('requestUser', function () {
       DreamFactory.api.system.getUser ({
         id: Session.info () id,.
         related: 'lookup_keys'
       }). Then (function (result) {
         var user = Session.info ()
         var lookups = _.chain (user.lookup_keys.level)
           .map (function (lookup) {
             return [lookup.name, lookup.value];
           })
           .Object ()
           .value ();
       });
     });

if you know another way to solve my problem I'm happy to help.


Viewing all articles
Browse latest Browse all 5028

Trending Articles