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 ?

  • duraisankar and ospteam replied to this.
    • 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.

    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.

    ospteam Thank you so much...for explaining the usage of Settings Rule with a Good Scenario

      14 days later
      Write a Reply...

      -An Initiative Of OneStopPega- Love our work? Support Us🖤