Request a new contrib repository for "Simplified Page Rights Viewer" Application

Hello,

I am working on a small contrib extension named Simplified Page Rights Viewer Application.

This extension will be used to visualize the rights applied on a page.
Basically, the extension will add a menu entry to the page menu (viewers section) or a tab at the bottom of the page (like comments, attachments …) and when the user clicks on the menu entry the rights actually applying on the page will be displayed and it will be also possible to view all the rights explicitly applied on the page and its parents.

The objective of this extension is to simplify the readability and the comprehension of the rights applied on a given page.

This extension is using the XWiki Rights API extension to retrieve the rights.

Thank you!

Thanks Mohamed for the proposal. My only comment is on the term “Simplified”. I don’t understand it. AFAIU the extension will display the computed right for the page, there’s nothing simplified. Also the “simplified” part reminds me of https://extensions.xwiki.org/xwiki/bin/view/Extension/Rights%20UI%20Simplifier but it makes sense there. Initially I thought this was a special viewer for this extension.

What about simply:

  • Pretty name: Page Rights Viewer Application
  • GH repo name: page-rights-viewer

?

Thanks

Hi Vincent,

Initially, the “Simplified” term was used because the way the page rights are visualised with this extension will be simplified as it will be possible to view all the rights applied on the tree of pages (from wiki level to the current page) in the same page whereas with the standard UI you need to check the rights of each node of the page tree separately.

Thanks

That said, I am ok with your proposal :

  • Pretty name: Page Rights Viewer Application
  • GH repo name: page-rights-viewer

the way the page rights are visualised with this extension will be simplified as it will be possible to view all the rights applied on the tree of pages (from wiki level to the current page) in the same page

I thought the extension would show the rights for the current page only but re-reading your description I see that you mentioned:

it will be also possible to view all the rights explicitly applied on the page and its parents.

I guess this is the tree you’re referring to. BTW isn’t this costly? Is it fast? Are you using the security cache for getting the info (recomputing them would be very costly probably).

whereas with the standard UI you need to check the rights of each node of the page tree separately.

So my understanding is that the “simplified” part is not about dropping features but more about UIX (single view vs having to navigate to each page).

I don’t think that adding “simplified” adds value to the name.

I’ll create the repo + jira.

Thanks

Done:

I thought the extension would show the rights for the current page only but re-reading your description I see that you mentioned: it will be also possible to view all the rights explicitly applied on the page and its parents.

By default the extension will show the actual rights applied on the page but the user will have an option to view the rights applied on the entire tree in case the user wants more details to understand/analyse the actual rights.

I guess this is the tree you’re referring to. BTW isn’t this costly? Is it fast? Are you using the security cache for getting the info (recomputing them would be very costly probably).

As I said above the entire tree rights is not displayed default and normally it’s not costly because I am using the XWiki Rights API extension to retrieve the rights which AFAIU is using the security module APIs.

Thanks!

@mouhb another use case I was thinking about is the ability to list who are the users having admin rights on a given page, to know who you should contact if you need to contact an admin. Is that a use case your extension will solve?

Thanks

At first grace yes, because the extension will show all rights applying on a given page.

Ok cool. Not sure I understand how the UI will look like. Imagine that you have 10K users, you will list all users and what rights they have on the page? And this for the current page and all its parent page?

The UI will only show users/groups for which rights are explicitly set on the page and its parents. In general rights are handled using groups, it’s even recommended, so, I don’t think it’s a common use case to give explicit rights for 10k users.

Basically, the application will display actual rights applied on a given page (see List getActualRules(EntityReference ref) method on XWiki Rights API documentation) and the user could see the details by displaying explicit rights applied on the entire tree.

ok so for the current page it’ll be the actual rights (and not explicit rightsà, which means displaying 10K entries in my example, no?

Yes for the current page it will be actual rights, explicit rights will be displayed for each tree level when the detailed mode is selected.

Suppose that you have 10k users on a fresh wiki and on the wiki administration you give all rights to XWikiAdminGroup + View rights to XWikiAllGroup + Deny View rights to 1 user (JohnDoe). So, if you go to any page and check the actual rights using the extension it will only show you only 3 lines (one line by subject : XWikiAdminGroup, XWikiAllGroup, JohnDoe user) and 2 column for “Allowed rights” and “Denied rights”. See screenshot : Up1.

ok thanks, I get it now!

I guess you’re going to use a LiveData since there could still be a lot of lines and filtering is needed anyway.

Thx

The usage of LiveData is planned as an improvement in future version as I don’t have a lof time now.

Another use case that could be nice would be to list all children pages for which there are some explicit rights set (to be able to see “restricted pages” in Confluence language, see Page Restrictions | Confluence Data Center 7.19 | Atlassian Documentation

EDIT: I guess this could be implemented easily by doing a XWQL query to find all documents having an XWiki.XWikiRights object, under a given root.

1 Like