Hi, I would like to access the admin database to get information about users and roles.
I need this to build report (show who is the creator of the entry and who is printing it, which not always the same) and apply hidden filter based on roles. I was trying to access those tables like normal item/task but It isn't working.
For example, this one is working for accessing normal item/task:
var table = item.task.item_by_ID(parseInt(6)).copy();
table.open({fields: ['customer_name'], where: {id: 1}});
table.each(function(c){console.log(c.customer_name.value);});
But I can't access the user and role item/task which is having ID of -3 and -2 respectively.
I understand that there is tutorial on how to use separate table for users but it is
- Lack of information on how to handle roles
- I prefer using the frameworks default capabilities as much as possible to reduce customization
Thanks!