Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[1.4.0rc2]global API KEY don't have all permission #3365
What were you doing?
following the RC update, I see that it is no longer possible to call the API of plugins.
exemple with shutdown printer plugin :
inside method on_api_command (shutdown printer plugin) i put this control :
but in 1.3.12 no pb
I also try with user API it's work correctly, but with global api key no
What did you expect to happen?
What happened instead?
Did the same happen when running OctoPrint in safe mode?
Version of OctoPrint
Operating System running OctoPrint
Printer model & used firmware incl. version
Browser and version of browser, operating system running browser
Link to octoprint.log
Link to contents of terminal tab or serial.log
Screenshot(s)/video(s) showing the problem:
I have read the FAQ.
It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Read the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!).
If you did not intend to report a bug but wanted to request a feature or brain storm about some kind of development, please take special note of the title format to use as described in the Contribution Guidelines.
Please do not abuse the bug tracker as a support forum - that can be found at discourse.octoprint.org. Go there for any kind of issues with network connectivity, webcam functionality, printer detection or any other kind of such support requests or general questions.
Also make sure you are at the right place - this is the bug tracker of the official version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third party OctoPrint plugins or unofficial versions. Make sure too that you have read through the Frequently Asked Questions and searched the existing tickets for your problem - try multiple search terms please.
I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2019-12-16 22:10 UTC) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you!
PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.
I try to replace the permission control and it seems to work
but inside the octoprint code i see that :
what is the right solution for controlling permissions on plug-in APIs?
Declaring them for your plugins and using them instead of the generic and deprecated admin/user permissions. There's a new hook for that called
Still, the global API key should indeed always work, so I'll look into that as well here.
thx @foosel ,
import necessary :