Anthology Logo
search rss_feed menu

Bookmarklet To Help Map Entitlements To Permissions

One of the most difficult aspects to using the REST API is mapping the entitlements in the swagger documentation at to the permissions available in the UI for creating a system role. Using this custom javascript bookmarklet makes this a lot easier. Here is the code:


Simply create a new bookmark in your browser, paste this code in, and save it.

So what will this do for you? Essentially, this code searches the current webpage looking for checkbox input tags. It finds the value of that checkbox and displays this on the screen. In the context of the privileges page that you use to set permissions for a user role, this value is equal to the entitlement.

Here is a screen shot of that page before running this script:

a screen shot of system role privileges before running the bookmarklet

And here is a screen shot after running this script:

a screen shot of system role privileges after running the bookmarklet

As you can see the entitlement is now listed under the role. So now you can simply find the entitlement you are looking for in swagger, and ctrl-f/cmd-f to search for it here. Much easier than before.

As a side effect, you can use this on any page in Learn and get useful information. As an example, search for courses or user, and now you can use this script to find out the objects pk1 value.