-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add privileges/authorization info to the API #438
Conversation
9b0b819
to
1edcee9
Compare
FYI, |
1edcee9
to
73168c6
Compare
Done. |
a4b7c74
to
106de78
Compare
It's certainly a good idea to try to add the ACL information, but it's a bit more complicated to merge this into the scripts, ACL's could be part of the core repo as well (and plugins are allowed to have different models). I'll try to take a look as soon as I can find some time. |
106de78
to
3ce6c7f
Compare
3ce6c7f
to
65f4ad8
Compare
I suppose adding this, even if incomplete, can't harm for the time being? And while plugins can have different models, correct me if I am wrong, but the
Or am I missing something? |
The script certainly won't capture everything, but when it comes to ACL's and menu registrations the reality is a bit more complicated (see for example the ACL's in https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/models/OPNsense/Core/ACL/ACL.xml). The same endpoint may also exist in multiple ACL's. I haven't looked in depth to your code yet, but before we are adding this, we should at least make sure this works for 90% of core's MVC features to prevent future discussions. So, as soon as I do have some time available, I'll take a look. By the way, the user/group manager also shows which endpoints a role (privilege) contains. |
…e sure we can search them as well. (different solution for opnsense/docs#438)
…e sure we can search them as well. (different solution for opnsense/docs#438) (cherry picked from commit 6d6b52e)
This adds information about the required privileges to the API pages. Uses the corresponding ACL.xml, if found in the source code.