
- 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:06 AM
Strange also ... one other ACL where I use the same code ... current.group.manager returns 'empty' (i mean nothing ... and not 'undefined') in log ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:08 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:08 AM
If you are indicating to the current record assignment group manager, it should be
current.assignment_group.manager
I wonder if you have a field with value group. current.group is not valid.
Please like or mark correct based on the impact of response.
- 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.