Ui Builder: Problem adding a role in chrome toolbar JSON

fabrizio95360
Tera Expert

Hi developers, in chrome toolbar I have a problem adding a role that I created

fabrizio95360_0-1705065630163.png

 

"availability": {
      "roles": [
        "sn_esg.observer", "sn_grc_metric.manager"
      ]
    }

 

 if I only add 1 role it works, but if I add another one they both don't work, has anyone had the same problem?

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

So the way this works is you can do a match ANY role or a match ALL role. What you're currently doing is a match ALL so the user would need both roles. if do you the following then they'd only need one of the two:

"availability": {
    "roles": ["sn_esg.observer,sn_grc_metric.manager"]
}

View solution in original post

2 REPLIES 2

Brad Tilton
ServiceNow Employee
ServiceNow Employee

So the way this works is you can do a match ANY role or a match ALL role. What you're currently doing is a match ALL so the user would need both roles. if do you the following then they'd only need one of the two:

"availability": {
    "roles": ["sn_esg.observer,sn_grc_metric.manager"]
}

DChandlerKy
Tera Guru

Is it possible to do the opposite? Something along the lines of "Role != <xyz>"