Services to get Roles and ObjectLists
Posted: June 6th, 2022, 3:20 pm
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.
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.