Every Page has two properties that control security. Secured and Force Role Security.
- Secured Enforce Role Security Properties
- SecuredEnforceRoleSecurityProperties.png (20.57 KiB) Viewed 11281 times
- Secured Enforce Role Security Properties
- SecuredEnforceRoleSecurityProperties.png (20.57 KiB) Viewed 11281 times
If secured is false, any one can access the page. If secured is true and enforce role security if false, any logged in user can access the page. If secured is true and enforce role security is true, then only logged in users who have that page associated with their authorization can access that page.
All links needed to setup the authorization is under the security menu
- Menu
- Menu.png (18.95 KiB) Viewed 11281 times
- Menu
- Menu.png (18.95 KiB) Viewed 11281 times
Every user must have an authorization assigned to them in order to be able to login to the app. To see a users authorization go to the user management page and click on assign authorization.
- Users
- Users.png (12.24 KiB) Viewed 11281 times
- Users
- Users.png (12.24 KiB) Viewed 11281 times
New Authorizations can be added from the Authorizations page.
- Authorizations
- Authorizations.png (56.29 KiB) Viewed 11281 times
- Authorizations
- Authorizations.png (56.29 KiB) Viewed 11281 times
Authorizations then have Roles assigned to them which can be done by clicking on the Roles link in the authorization list. New Roles can also be created from the page.
- Roles
- Roles.png (9.91 KiB) Viewed 11281 times
- Roles
- Roles.png (9.91 KiB) Viewed 11281 times
Roles then are assigned Object Lists. There are three types of lists.
- Webpage which will be a list of page you want to give access to
- Rest API Verb which will be a list of apis you want to give access to
- User Defined which is for custom logic using the CheckAccess service. For example to hide a button. (See below)
Below is an example of a webpage list.
- WebPage List
- WebPageList.png (10.19 KiB) Viewed 11281 times
- WebPage List
- WebPageList.png (10.19 KiB) Viewed 11281 times
- WebPage List Objects
- WebPageListObjects.png (18.94 KiB) Viewed 11281 times
- WebPage List Objects
- WebPageListObjects.png (18.94 KiB) Viewed 11281 times
If a user has an authorization that has a role that has this list that user would then have access to the Home,
WorkflowRequests, and WorkflowApproval pages.
For a user to have access to a page or api the user must have an authorization that is assigned a role that is assigned a list that has that page or api in it.
The CheckAccess service can be used to see if a user has access to a specific object. It takes in UserId, ObjectId, ObjectType (MVC_View, EP_WebPart, EP_REST_Resouce_Verb, UserDefined). This service will return WorkData/CheckAccess/Output/Result/Access where Access = True or False. Checks for types MVC_View, EP_WebPart, EP_Rest_Resource_verb are done automatically. This service is mainly used for custom security logic using UserDefined type.
In the IDE we use a UserDefined list to hide/unhide the promote button so only certain authorizations can promote to QA/PD.
- User Defined Lists
- UserDefinedLists.png (16.81 KiB) Viewed 11282 times
- User Defined Lists
- UserDefinedLists.png (16.81 KiB) Viewed 11282 times
We then use the CheckAccess Service and a Binary Decision to determine if we should hide the button which we do using SetControlProperty.
- Check Access Service Setup
- CheckAccessServiceSetup.png (21.35 KiB) Viewed 11283 times
- Check Access Service Setup
- CheckAccessServiceSetup.png (21.35 KiB) Viewed 11283 times
- Check Access
- CheckAccess.png (34.26 KiB) Viewed 11283 times
- Check Access
- CheckAccess.png (34.26 KiB) Viewed 11283 times
- Binary
- Binary.png (69.24 KiB) Viewed 11283 times
- Binary
- Binary.png (69.24 KiB) Viewed 11283 times
- Set Control Property
- SetControlProperty.png (34.37 KiB) Viewed 11283 times
- Set Control Property
- SetControlProperty.png (34.37 KiB) Viewed 11283 times