Get Role of currently logged in user

Posted by Rollbase User on 08-Sep-2010 02:05

I have an object that has NO relation to the user object. I need to get the user role of the user currently logged in so added this script to my page: var uRole = {!#CURR_USER.role}; alert(uRole); When my role is an administrator, I have no problem getting my user role but when my user is does not have any permission to the user object, I cannot get the Role of the currently logged in user. Is this a bug? I tried using query API but this will only give me the numeric Id which will entail recoding when transferring to the application to a new zone.

All Replies

Posted by Admin on 08-Sep-2010 10:38

Assign View permissions for User object to "Query API" role - this should resolve the issue.

BTW, you can try new #code suffix on rollbase.com for Role.

This thread is closed