Open
Description
Being able to switch which user the code is acting as for a given block would be very useful.
Something like:
with c.sudo("application-user"):
c.run("mkdir /var/www/some-dir") # some-dir has roles/permissions for "application-user"
c.run("something application-user has permissions for")
I think this would be especially helpful when trying to encapsulate a body of work as a function that takes a context.
Thanks so much for all y'all's work on this library. I am happy to implement this feature if you think it fits into the project.
Metadata
Metadata
Assignees
Labels
No labels