Hi,

We are checking the user permission in jaggery in following way:

function isUserAuthorized(username, permission, action, bpsUrl){
    var carbon = require('carbon'),
    process = require('process'),
    srv = new carbon.server.Server({url: bpsUrl}),
    tenantId = carbon.server.tenantId(),
    userManager = new carbon.user.UserManager(srv, tenantId),
    user = new carbon.user.User(userManager, username);
    return user.isAuthorized(permission, action);
}

it works perfectly fine for super tenant but get false for tenant users
even they have relevant permission.

Thanks,
Milinda

-- 
Milinda Perera
Software Engineer;
WSO2 Inc. http://wso2.com ,
Mobile: (+94) 714 115 032
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to