Differences

This shows you the differences between two versions of the page.

Link to this comparison view

security - by relationship to group [2016/09/14 14:19] (current)
Line 1: Line 1:
 +~~NOTOC~~
 +====== Security By Relationship to Specific Group ======
 +In applications with relatively few levels of permission assignment, security can be reasonably set up by detecting whether or not the currently logged-in [[Users|user]] is related to a certain [[Groups|permission group]].
  
 +===== How to Set Up =====
 +To set up this type of security, you first need a method of identifying a specific group. There are three common methods of doing this:
 +  * **By [[Group|group]] name**\\ If you as the builder are the only user who can edit the name of the groups involved, and you are very confident that the names of the groups do not need to change, identifying a certain group based on its name is an acceptable method.
 +  * **By [[Field Type - Selection|selection]] or [[Field Type - Checkbox|checkbox]] field on group**\\ A more reliable method than using the group'​s name, creating a drop-down or separate checkboxes for each group is a second way of identifying a certain group. For example, if the application will have three groups: sales, service, and administration,​ you might create a static drop-down for those three options, or alternately three checkboxes. These fields would then need to be set appropriately in order to identify the groups.
 +  * **By selecting group on [[Best Practices - Global Application Settings|global application settings]]**\\ The most reliable and flexible method of the three, under this method, you'd need to have a [[Best Practices - Global Application Settings|global application settings]] [[Table|table]],​ and on that table, you'd need a [[Field Type - Selection|selection]] [[Field|field]] for each group you need to identify.
 +
 +Once you've chosen your method of identifying a certain [[Group|group]],​ you're ready to set up your security. Find a [[Form Type - Page|page]] you wish to control access to, and bring up the [[Automation Layer|automation layer]]. Access the [[Action Manager|action manager]] for the page, and view the [[Automation Trigger - When Form Loads|security]] for the page. Set up a [[Action Type - Record Exist|record exist evaluation]] to check and see if the [[Query Builder - Starting Points#​Currently Logged-in User|current user]] is related to the [[Group|group]] you wish to check for. Based on the result of that evaluation, use a [[Action Type - Set Modes|set modes]] or [[Action Type - Hide Form|hide form]] [[Action|action]].
security - by relationship to group.txt ยท Last modified: 2016/09/14 14:19 (external edit)
Copyright WorkXpress, 2019