Hello!
I am struggling with access control mechanic around PSUControl plugin. I would like to grant individual users the rights to turn on/off the printer.
The default 'Guest' is able to see the button, but unable to control it (throws 403). This is fine.
I would expect, that granting 'System' privilege, which is "Allows to run system commands, e.g. restart OctoPrint, shutdown or reboot the system", would do the trick. But unfortunately, it won't.
(Unsurprisingly, master account is working just fine. I guess because of the 'Admin'?)
I have stumbled upon some notes about "plugin permissions", but it looks like that PSUControl is not registered to this.
So, is there a way how to, let's say, create my own permission, granting access to PSUControl only; or at least connect it to some other, e.g., 'System'?
Thanks a lot!
J.
PSUControl seems to use the user_permission (ie: all users in the Users group). This predates the more granular permission system in OctoPrint 1.4.0.
The plugin will need to be updated for it to use the granular permission system introduced in OctoPrint 1.4
Thanks a lot! After looking through the source, it looks like that I could use the default 'Operator' group as some sort of workaround.
On the other hand, it suddenly started to work with ordinary users (i.e. those logged in). It's hard to say what changed, I've played a little bit with the groups. Hopefully it will work after a reboot as well.
(I guess one has to complain/ask first in order to make it work. ).
Ad permissions: I've sent a request to the PSUControl github. Thanks to you I at least knew what to ask for.
J.
EDIT: I rushed my judgement. It was NOT working. However, adding the users into 'Operator' group (as a subgroup of different group) makes it behave properly. Even though the 'Operator' has ZERO privileges.