User level ID - Bypass

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.

User level ID - Bypass

Postby dire » Mon Jan 01, 2018 9:49 pm

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
dire
 
Posts: 34
Joined: Mon Sep 26, 2016 7:53 pm

Re: User level ID - Bypass

Postby motfs » Tue Jan 02, 2018 12:45 pm

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.
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: User level ID - Bypass

Postby dire » Tue Jan 02, 2018 11:51 pm

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?
dire
 
Posts: 34
Joined: Mon Sep 26, 2016 7:53 pm

Re: User level ID - Bypass

Postby motfs » Wed Jan 03, 2018 10:46 am

> 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"))
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: User level ID - Bypass

Postby dire » Wed Jan 03, 2018 3:05 pm

It works! thx
dire
 
Posts: 34
Joined: Mon Sep 26, 2016 7:53 pm


Return to General Discussion (ASP.NET Maker)