New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAK-43711 (V2): SWITCH: Mailarchive: Use permissions widget #8256
Conversation
frasese
commented
May 29, 2020
- Moved properties files from tool to api.
- Merged permissions.properties files into mailarchive.properties.
- Adapted to permissions webcomponent.
- Update PermissionsEntitiyProvider to filter by SEARCH + "."
This tool has a special problem related with permissions names. They are called mail.XXX ("mail.read", "mail.new" and "mail.delete.any"). The problem is, when the webcomponent retrieves the permissions data from the direct REST url (PermissionsEntitiyProvider), it checks for everything that starts with "mail". So, not only mail.XXX (mailarchive's permissions), but also mailtool.XXX (mailsender's permissions) are returned. So we have two different solutions here. 1.- Set the webcomponent tool-key as "mail." (#8255) 2.- Change PermissionsEntitiyProvider to look for SEARCH + "." (THIS ONE). Both PRs are exclusive, choose one or other. |
Have you searched for other tools that use the direct endpoint? I suspect that there aren't many, but you could get an idea. I'd rather go with this solution and fix the other tools. I don't like the idea of hacking the selector in the component when we can just fix the endpoint. |
I also prefer to fix the endpoint. And no, there are no more uses of that endpoint. |
Finally, in "messages" PR (#8265) we have needed to add the hacking selector option, because the tool id includes a dot (msg.permissions). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure which of these versions we settled on. I'll leave it up to your judgement :)
This looks okay though.
b419fdb
to
ee6ca51
Compare
* Moved properties files from tool to api. * Merged permissions.properties files into mailarchive.properties. * Adapted to permissions webcomponent. * Update PermissionsEntitiyProvider to filter by SEARCH + "." webcomponents/tool/src/main/java/org/sakaiproject/webcomponents/permissions/PermissionsEntityProvider.java
This PR is the good one. The other one was closed in favour of this. |
Go for it, then :) |