-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[1.4.0rc3] Permission issue, can start print from Cura without such permission #3398
Comments
Is this something you plan to fix today (this year) still? If not this sounds like something I could make a PR for, for you to check out next year. |
Not today, so sure, go ahead :) |
It looks like the All permissions which specify additional needs ( Removing the I've been looking why multiple needs are not working and will continue to do so. |
See below |
My original assessment was correct. I understand the Needs and Permissions a bit better now. When an OctoPrintPermission has multiple Needs, Permission.allows() checks if there's an intersection between the needs of the Permission and the provides of the Identity. Because the length of the intersection is not checked, this is true if one or more needs overlap. So because the The quickest fix is to remove the multiple Needs in the OctoPrintPermissions definitions. A better fix is to check the length of the intersection between the Identity provides and Permission needs to be the same as the Permission needs in Permission.allows, but that's an upstream fix. |
This is fixed by 3229e65, because that removes the multiple Needs. By doing that, it also sort of removes the necessity of #3414, but that PR might still be useful as defensive programming in the case that multiple Needs ever make a return (the implementation of having multiple Needs on a Permission is still there). |
Yeah, I'm actually just now looking through it and trying to figure out if it will have any problematic side effects. Leaning towards a merge though. |
PR merged and permission modelling changed, so this should be solved and ready for 1.4.0rc4 |
1.4.0rc4 is out |
Problem
Originally posted by @gcurtis79 in #3389 (comment)
Solution
Make sure
PRINT
permission gets checked on evaluation ofselect
andprint
request parameters on upload API, probably not the case right now, causing this issue.The text was updated successfully, but these errors were encountered: