ACL issue - current.group.manager returns undefined ?!?!?

Zod
Giga Guru

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

}

1 ACCEPTED SOLUTION

nitish99
Tera Guru

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.


View solution in original post

5 REPLIES 5

I'm so stupid .... thank you!