-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Implement Admin Delegation #28189
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
Implement Admin Delegation #28189
Conversation
juliusknorr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just skimmed it quickly, seems good from the general approach
Any specific reason you went for a app that just exposes the delegation settings? I think that could probably also just be part of settings and we can have a configuration option then to turn it off. |
|
So my next big problem to solve is how to handle the setAppValue and the I believe adding a simple mapping |
|
when setting up from scratch I get this on the CLI: |
|
@CarlSchwan do I understand correctly that this allows only a whole page of settings or a section, not specific setting strings ? |
I don't have a good idea right away, but that is somewhat related to the idea from #18465 where with a declarative definition of app config values we could indicate delegation of certain config keys. So maybe some kind of mapping could be an intermediate step to allow delegation of settings for now where it is required. |
@PVince81 Yes it allows a while page of settings and will display a section if at least one of the setting inside of it is authorized. For the specific setting strings, it's needed for the ISettings class to declare which setting string they can edit so that it's possible to modify these settings.
@juliushaertl The linked issue looks interesting. If we decide that this is something we want, it would probably be better to do it before finishing this feature otherwise we will have two mappings :( |
d28edda to
72cd7b8
Compare
72cd7b8 to
b8b8a42
Compare
|
Added a few comments that are no blockers imho. |
8109199 to
4961d27
Compare
|
/compile amend / |
4961d27 to
8232b95
Compare
0f24778 to
d6a1df2
Compare
tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
Outdated
Show resolved
Hide resolved
PVince81
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 code looks good
d081de4 to
712f3da
Compare
This makes it possible for selected groups to access some settings pages. Signed-off-by: Carl Schwan <[email protected]>
712f3da to
6958d80
Compare
|
@CarlSchwan There is a change that was going to be reverted, but in the end it was not: Due to that change if an app specifies a class that does not exist in the |
See #28189 (comment) Signed-off-by: Carl Schwan <[email protected]>
totally an oversight, I created #32655 |
See #28189 (comment) Signed-off-by: Carl Schwan <[email protected]>
Perfect, thanks! |
See #28189 (comment) Signed-off-by: Carl Schwan <[email protected]>
See #28189 (comment) Signed-off-by: Carl Schwan <[email protected]>
See nextcloud#28189 (comment) Signed-off-by: Carl Schwan <[email protected]>
fix #11687
Current status
settings can be marked as "allow-delegation" in the app info.xml file
Once marked as allow-delegation they are available in a new setting category in the admin category. In it an admin can select some groups and give them access to the specified setting
Once a normal user get access, they can see the new setting in their setting navigation bar and access it
Controller using the new annotation in their action
@AuthorizedAdminSetting(OCA/<app>/Settings/AdminSettings.php)can be used by the user (who has the authorization for the admin)sorting of settings in UI
English name Admin Right Permissions/Admin Right Priviledges/Access Control?