-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Persist the config changes of usermanagement #23333
Conversation
SummaryIn the user management page, the settings to show languages, last login etc were not saved in the db. DescriptionThe idea behind this PR is to save the changes made to settings in the user management page for:
The only option that was being saved was How was it tested?
|
e30d8a4
to
fa8a6c6
Compare
540b211
to
82eee59
Compare
a0dfe4a
to
b74add5
Compare
|
do you |
Yah I did. Here is the log captured from my console:
|
Persist the changes made to usermanagemnt like: - Show Languages - Show last login - Show user backend - Show storage path Signed-off-by: Sujith Haridasan <sujith.h@gmail.com>
7765be2
to
af74889
Compare
What is the status here? :) |
I have updated the changes requested :) The conflicts need to be resolved in the branch... |
Please rebase to master :) |
@@ -260,6 +260,10 @@ public function usersList() { | |||
$serverData['newUserGenerateUserID'] = $this->config->getAppValue('core', 'newUser.generateUserID', 'no') === 'yes'; | |||
$serverData['newUserRequireEmail'] = $this->config->getAppValue('core', 'newUser.requireEmail', 'no') === 'yes'; | |||
$serverData['newUserSendEmail'] = $this->config->getAppValue('core', 'newUser.sendEmail', 'yes') === 'yes'; | |||
$serverData['showLastLogin'] = $this->config->getAppValue('core', 'users-showlastlogin', 'no') === 'yes'; |
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.
I'd prefer to have those stored in the 'settings' app instead of 'core', the other one make sense for core since core sends out the email and generates the user id, but the show* settings are really only settings app relevant.
if (!in_array($key, $allowed, true)) { | ||
return new JSONResponse([], Http::STATUS_FORBIDDEN); | ||
} | ||
|
||
$this->config->setAppValue('core', $key, $value); | ||
$this->config->setAppValue('core', 'users-'.$key, $value); |
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.
Ideally we could introduce them as user values so that each admin user has their own setting for 'showlastlogin', 'showlanguages', 'showuserbackend', 'showstoragepath'
using setUserValue instead
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.
Also wouldn't this basically break the existing newUser.sendMail setting since the key would now be prefixed with 'users-' ?
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.
See inline 😉
As there is no feedback since a while I will close this PR. If you are still willing to get this in, please address the potential comments and rebase to latest master. Then, feel free to re-open. |
Persist the changes made to usermanagemnt like:
Signed-off-by: Sujith Haridasan sujith.h@gmail.com