Hi Team,
How to restrict the managers from modifying the attributes in the web portal for their contractor/partner subordinates?
Hi Team,
How to restrict the managers from modifying the attributes in the web portal for their contractor/partner subordinates?
Just some options:
1: In the Admin portal: Configuration > Select 'Web portal'
Search for:
VI_Employee_MasterData_OrganizationalAttributes
VI_Employee_MasterData_Attributes
VI_Employee_MasterData_LocalityAttributes
And remove all the OOTB selected properties for each configkey
P.s. this is not exclusive to managers but for everybody with edit rights.
2: Table scripts (overwrite default permissions with.CanEdit)
If you want a more fine-grained option...
Use table scripts: Script (Onloaded) of the person table.
If AppData.Instance.AppType = AppType.Web AndAlso _
(Session.Principal.Groups.GetGroupNames()).Contains("VI_4_ALLMANAGER") Then
...
Entity.Columns("BirthDate").CanEdit = False
...
End If
3: Create a copy of the permisison group: VI_4_ALLMANAGER > CCC_4_ALLMANAGER
And modify the OOTB permissions to your company likings.
This is IMHO the most secure (on the lowest level), flexible and easy to manage
4: Customize the HTML application...
Overwrite the canedit option when person is manager look for in HTML application code:
this.isManagerForPersons = await qerPermissionService.isPersonManager()
canEdit: this.isPersonAdmin || this.isManagerForPersons,
HTH
Niels de Groot I actually added below script on person on loading script and removed permissions (VI_4_ALLMANAGER ) from user manager and then did the testing from web portal. Managers are still able to update exit date columns from web portal and the entries are getting saved in DB.
I am out of ideas; can you suggest me if I am doing anything wrong here?
If AppData.Instance.AppType = AppType.Web AndAlso _
(Session.Principal.Groups.GetGroupNames()).Contains("VI_4_ALLMANAGER") Then
...
Entity.Columns("exitdate").CanEdit = False
Did you restart the apppool/webservices?
%windir%\system32\inetsrv\appcmd.exe recycle APPPOOL "ApiServer93_POOL"
I did IISReset.
DO I need to IISreset in App server as well?
No.
for testing If you just do (without if statement):
Entity.Columns("exitdate").CanEdit = False
Maybe restart the webserver (IISRESET can cause issues)
and
Click on (?) Connection > Permission Groups
Check if 'VI_4_ALLMANAGER' is present