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

ENH Add more nuanced permissions to Dev Task runner #10852

Closed
andrewandante opened this issue Jul 3, 2023 · 3 comments
Closed

ENH Add more nuanced permissions to Dev Task runner #10852

andrewandante opened this issue Jul 3, 2023 · 3 comments

Comments

@andrewandante
Copy link
Contributor

andrewandante commented Jul 3, 2023

Affected Version

CMS All

Description

Currently the ability to view and run a BuildTask from the browser is restricted to ADMINs via a hard-coded check in TaskRunner.php: https://github.com/silverstripe/silverstripe-framework/blob/5/src/Dev/TaskRunner.php#L42-L57. A more fine-grained permission scheme would allow a subset of users to be able to trigger a specific task, for example.

Proposal

  • Implement proper permissions schemes on the tasks and the runner.
  • Allow anyone that can see at least one task to visit /dev/tasks and have the list rendered.
  • Allow per-task configuration
  • Extra for experts - perhaps a CMS admin area to configure DevTasks? Then permissions could be managed in the same way as pages, for example. Could be fun 😉

PRs

@andrewandante
Copy link
Contributor Author

I've had a cursory play-around with this - the most jarring thing is that we get to dev/tasks via the DevelopmentAdmin controller, which also has a strict isAdmin() check. So this would also need to add a sort of "can see at least one dev-admin area" check to that init() method as well - which is fine, and lovely and granular, but a little more work 😄

@GuySartorelli
Copy link
Member

GuySartorelli commented Nov 10, 2023

@andrewandante I've added a docs PR to call out this change in the changelog. Can you please take a look and suggest any changes you think should be made?
Note that the lack of detail is mostly because I was feeling a little lazy lol so if you think there should be more detail please don't hesitate to say so (and preferably suggest specific wording)

@GuySartorelli GuySartorelli removed their assignment Nov 12, 2023
@emteknetnz emteknetnz self-assigned this Nov 14, 2023
@emteknetnz
Copy link
Member

Linked PRs have all been merged

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

3 participants