-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allow subadmins to read app config values #40961
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
c56b006
to
81e1044
Compare
Which apps are utilizing this functionality, or how can I obtain this information? |
@phil-davis the errors in the acceptance tests in https://drone.owncloud.com/owncloud/core/39004/136/18 are expected, aren't they? We need to adjust the tests. I mean, the code is fine but the tests aren't valid any longer with the new code. |
Grepping by |
I don't want to include this in 10.13.1 -- branching the release branch now, before this gets merged. |
branched from master, - taking 5 small well understood easily testable fixes (for php8 forward compatibility) - but before #40961 gets merged to master.
Yes, if the requirements have changed (or are now understood differently) then we need to adjust the tests. |
I'll leave it up to you. Feel free to add your commits here. |
acceptance tests have passed |
* prepare 10.13.1 branched from master, - taking 5 small well understood easily testable fixes (for php8 forward compatibility) - but before #40961 gets merged to master. * Improve images (#40963) * Revamped the onlyoffice.png in gimp: cleaner and smaller PNG, ugly checkerboard background removed. (It was actually a 200k jpeg) Replaced wopi.png with the logo found at github.com/OfficeDev/PnP-WOPI (it was a copy of the onlyoffic jpeg) * added transparent round corners to the new icons. drawio.png and richdocuments.png already have transparency. * fix: disallow pre-signed url access if the signing key is not initialized * bump Changelog * bump version.php for final * prepare merge back. * prepare merge back, using 10.13.2 prealpha ... --------- Co-authored-by: Juergen Weigert <jnweiger@gmail.com> Co-authored-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
what is the status of this? |
@IljaN @steelcuts @mrow4a can you please review this? |
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.
LGTM. Please add changelog.
Changelog added |
} | ||
|
||
/** | ||
* @NoAdminRequired |
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.
Note: there is also a NoSubadminRequired
annotation which allows a method to be used even if the user is not a subadmin.
So with just the NoAdminRequired
annotation, this method can be used by admins and subadmins, which is what we want. Ordinary users, and "the public" won't be able to use the method.
SonarCloud is complaining. CI is passing. Should we merge this? |
https://github.com/owncloud/core/blob/master/settings/Controller/AppSettingsController.php has tests in https://github.com/owncloud/core/blob/master/tests/Settings/Controller/AppSettingsControllerTest.php The new |
Unit tests added |
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.
LGTM if tests pass.
Kudos, SonarCloud Quality Gate passed! |
CI is green..merging. |
Description
Create a new
AppConfigController
aiming to deprecate the old "core/ajax/apppconfig.php" file. The functions in the "core/js/config.js" file will use the new controller.Some additional notes:
In addition, the "getApps", "getKeys" and "getValue" will be available to subadmins ("hasKey" will rely on the "getValue" method in the server, so it will also be available)
Related Issue
https://github.com/owncloud/enterprise/issues/5981
Motivation and Context
Some of the functionality wasn't working for subadmins because they couldn't read the app config.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: