Services to get Roles and ObjectLists

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
AkshayKhanolkar
Posts: 44
Joined: May 2nd, 2022, 11:53 am
Contact:

Services to get Roles and ObjectLists

Unread post 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.
word count: 149

Tags:
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Re: Services to get Roles and ObjectLists

Unread post 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.
word count: 97
JustinVanRegenmorter
Posts: 576
Joined: August 26th, 2021, 9:56 am
Contact:

Re: Services to get Roles and ObjectLists

Unread post by JustinVanRegenmorter »

This service has been added as of DesignTime Revision 2407 and RunTime Revision 1077.
word count: 14
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Re: Services to get Roles and ObjectLists

Unread post by CathyC »

The service is called GetUserAccess
word count: 5
Post Reply