Page 1 of 1
User level ID - Bypass
Posted: Mon Jan 01, 2018 9:49 pm
by dire
Hi,
How can I bypass user ID level security for specific type of role? For example role head office need to see all contracts of all users. I don’t want to make dummy user on top of structure. I want to disable user level checking for specific role on specific object.
thx
Re: User level ID - Bypass
Posted: Tue Jan 02, 2018 12:45 pm
by motfs
Add User Level Permission by the User_Level loaded server event. Read Server Event and Client Scripts -> UserLevel_Loaded (Example) in help file for more detail.
Re: User level ID - Bypass
Posted: Tue Jan 02, 2018 11:51 pm
by dire
I tryed with CurrentUser (), works like charm
if (CurrentUserName() == "11001173")
AddUserIDByUserName("1001101");
But when I want to user CurrentUserInfo("field_of_role"), role is head_office , value is 2
if (CurrentUserInfo("sif_sodelavec_vloga") == "head_office")
AddUserIDByUserName("1001101");
or
if (CurrentUserInfo("sif_sodelavec_vloga") == "2")
AddUserIDByUserName("1001101");
doesn't work, any idea?
Re: User level ID - Bypass
Posted: Wed Jan 03, 2018 10:46 am
by motfs
if (CurrentUserInfo("sif_sodelavec_vloga") == "head_office")
CurrentUserInfo() returns object. Try to use SameString() (v2018), e.g.
if (SameString(CurrentUserInfo("sif_sodelavec_vloga") , "head_office"))
Re: User level ID - Bypass
Posted: Wed Jan 03, 2018 3:05 pm
by dire