I have tried obtaining user roles using different methods before. I think the following way is pretty simple to obtian an array or user roles and a comma separated string of user roles
var userRolesArray=database.getACL().getRoles().toArray()
var userRolesString="";
for (itr=0;itr
{ userRolesString+=userRolesArray[itr]+",";var userRolesArray=database.getACL().getRoles().toArray()
var userRolesString="";
for (itr=0;itr
}
userRolesString;
My previous post on this topic can be navigated to by clicking on the following link
database.queryAccessRoles(session.getEffectiveUserName()).contains('[Admin]') also seems fitting
ReplyDelete