Definition : Setting Rules are used to associate a name and value to a access role. We can use the getSetting() function and fetch the value and use it in fine access control.
Can anyone let me know a scenario how we can use this value in fine access control ?
Setting Rule from Security Category
azharrkv I guess this article might helpful for us to get an idea of it!
https://community.pega.com/knowledgebase/articles/security/84/setting-rules
Let wait for someone to reply who might have used it in their project.
Thanks for bringing in new Rule types into the discussion
- Best Answerset by azharrkv
azharrkv
To keep it simple, we all know about Global Resource Settings in Pega using which we load variables that are common across the environment. In the same way, we can load variables specific to each operator using the Setting rule in Pega.
Since the setting rule can be associated to each of the operators, it can also be used in Pega's authorization model.
Let's take a leave Management application where an employee can submit a leave request and managers can approve it & each manager should have different limits to approve leaves.
For eg:
Managers can approve till 2 days
Senior managers can approve till 5 days
Vice President can approve till 7 days
CEO can approve if >7
To decide whether a manager can approve the request or not, we can create a Privilege & associate it with the access role. But how do we achieve the days' restriction?
This can be achieved using the Setting Rule. We can create 3 settings namely [ManagerLimit, SMLimit, VPLimit], and associate it to the access role with the values as 2, 5, 7 respectively. Now using the OOTB function @getSetting(AppliesTo, SettingName) we can get the setting value tagged for the current operator and can implement the above approval matrix.
Let us know if this clarifies your question.