Skip to content
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

Summary: fix/clarify behavior of list permission #6660

Open
ebruchez opened this issue Dec 2, 2024 · 1 comment
Open

Summary: fix/clarify behavior of list permission #6660

ebruchez opened this issue Dec 2, 2024 · 1 comment
Assignees

Comments

@ebruchez
Copy link
Collaborator

ebruchez commented Dec 2, 2024

Access to the Summary page is tricky:

Now, we had a question from a user whereby it seemed that with 2021.1.x, users could access the Summary page, but with 2023.1.x, they can no longer. The permissions in the form look like this:

<permissions>
    <permission operations="read update delete">
        <owner/>
    </permission>
    <permission operations="create">
        <user-role any-of="my-role"/>
    </permission>
</permissions>

The UI that matches the above:

image

Now, the Summary page doesn't look at the data-based ("Owner", etc.) permissions at all to check the list permission. In fact, showing these checkboxes is considered a bug/regression (#5864).

Instead, the Summary page checks the list permission exclusively based on the other lines:

  • Anyone/Require token
  • Any authenticated user
  • Roles

This issue clarifies the above, but also suggests that maybe we should do more to help with the Summary page access. We discussed with @avernet, in particular:

  1. that maybe we should revive an "optimistic" permission check for the Summary page
    • if we don't have a `list permission otherwise
    • then if any of the data-based permissions has list, we show the page, otherwise we reject access
    • this said: this won't be possible if we hide/make readonly the list checkboxes for data-based permissions
  2. OR that maybe we should consider that the "Any authenticated user" line with list should be implied in some cases
    • but how?

+1 from customer

@avernet
Copy link
Collaborator

avernet commented Dec 2, 2024

Here is a slightly revised version of what we discussed this morning:

  • In the Permissions dialog, the "List" checkbox remains available for the "Owner" line.
  • Checking or unchecking "List" for "Any authenticated user" automatically checks or unchecks "List" for the owner, and vice versa.
    • When the dialog opens, if only one of the checkboxes is selected, the other is automatically "forced-checked."
  • At runtime, <permission operations="..."> without -list for <owner/> is interpreted as allowing any authenticated user to list (consistent with how we handle <any-authenticated-user/>).

Benefits:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants