
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:02 AM
Hi,
I got a strange problem with some ACLs.
Only group managers should be able to 'write' for a specifig field on the sys_user group.
My ACL looks like this ... and should work. But it doesn't. Read ok, but write not. Log tells me, that "current.group.manager" is undefined. WHY???
There is a user set as Manager and I see absolutely no reason why this should not be ok.
Write access is also NOT given to the manger due to debug result .... ;-(
***
var answer = false; //Restrict access by default
gs.info("Manager: TEST " + current.group.manager ); // log shows undefined!!!
gs.info("User: TEST " + gs.getUserID()); // sys_id
if(gs.hasRole('user_admin') || gs.hasRole('u_support') || current.group.manager == gs.getUserID()){
answer = true; //Allow access if user has 'user_admin' role or is group manager
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:10 AM
Hi there,
On what table are you doing this?
If your table is SYS_USER_GROUP then you can check manager by current.manager instead of current.group.manager.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:15 AM
I'm so stupid .... thank you!