User level ID - Bypass

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
dire
User
Posts: 41

User level ID - Bypass

Post 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


motfs
User
Posts: 258

Post 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.


dire
User
Posts: 41

Post 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?


motfs
User
Posts: 258

Post 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"))


dire
User
Posts: 41

Post by dire »

It works! thx


Post Reply