Page 1 of 1

Services to get Roles and ObjectLists

Posted: June 6th, 2022, 3:20 pm
by AkshayKhanolkar
Cathy and I are currently setting up the user roles and section visibility on the EASYCommerce base website. While working in 5.1 MVC we have decided to move logic from the 'GetVisibility' process to the User Management screens in conjunction with Configuration variables.

On taking a look, we saw that the user roles and object lists are stored as 'Security_*' in the EASYCommerce base tables. We also saw a 'CheckAcess' service that let us check if a particular user had access to an objectId from the Object list.

For our purposes, we request a couple of services that would let us query the roles for their corresponding object lists. We will have pages that use these lists to set visibility for different sections. A service called GetUserRoles. Also, something called GetObjectLists that takes the Role as input and returns the list of all the Objects in the list.

Re: Services to get Roles and ObjectLists

Posted: June 6th, 2022, 4:39 pm
by CathyC
In looking at the use, I think it would be better if we had 1 new service called something like GetUserRoleAccess which returns a tree of their roles and the objects they have under it.

In EASYCommerce in EP 4.8, we had a GetVisibility method which returned that tree which was manually maintained as a softcoded xml structure in a method. then each time a page needed to know if a user had access to something, it would call that method. here in 5.1, the new service would almost replace the need for that method.

Re: Services to get Roles and ObjectLists

Posted: September 29th, 2022, 3:58 pm
by JustinVanRegenmorter
This service has been added as of DesignTime Revision 2407 and RunTime Revision 1077.

Re: Services to get Roles and ObjectLists

Posted: February 1st, 2023, 1:39 pm
by CathyC
The service is called GetUserAccess