Skip to content
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

Toggle profile globally #29372

Merged
merged 2 commits into from
Mar 18, 2022
Merged

Toggle profile globally #29372

merged 2 commits into from
Mar 18, 2022

Conversation

Pytal
Copy link
Member

@Pytal Pytal commented Oct 21, 2021

Adds two new settings:

  1. A config.php option 'profile.enabled' which defaults to true to enable/disable profile globally
  2. A Profile section under Administration “Basic settings” to enable/disable profile by default for new users

Close #30866

Contributes to #28139

@Pytal Pytal marked this pull request as draft October 21, 2021 23:34
@Pytal Pytal self-assigned this Oct 21, 2021
@Pytal Pytal added 2. developing Work in progress enhancement feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.) labels Oct 21, 2021
@Pytal Pytal mentioned this pull request Oct 21, 2021
20 tasks
@jolly-jump
Copy link

jolly-jump commented Dec 7, 2021

Am I right, that this toggles globally, if profile pages are enabled or disabled and if they are disabled they can not be enabled by the individual user?

If this is the case, there is need for another issue: I'd like to have public profiles "opt-in" as the default setting.
Either because this is hardcoded (as is the "opt-out" feature at the moment), or preferably as a config-option.
I want to be able to set public profile pages to "not enabled by default" and let each user decide wether they want to go public or not.
One reason: the username is displayed in the URL, which (I believe) is not GDPR-compliant, if it is enabled by default and not sanctioned by extra privacy agreements.

@Pytal
Copy link
Member Author

Pytal commented Dec 9, 2021

@jolly-jump in the current state of this PR, setting the option to disabled would disable profile completely and users would not be able to enable their own profile individually.

You've made a good suggestion so we will also add an admin option to set profile to enabled/disabled by default for all users and allow individual users to opt-in or opt-out.

@Pytal Pytal force-pushed the feat/28139/global-profile-toggle branch 2 times, most recently from 99f8fe7 to 13d2cb1 Compare December 10, 2021 20:53
@shieldwed
Copy link

For those searching for a quick fix to disable all users profiles for now:

update oc_accounts set data = JSON_SET(data, '$.profile_enabled', JSON_QUERY('{"value": "0", "scope": "v2-local", "verified": "0"}', '$'));

@kroerig
Copy link

kroerig commented Jan 28, 2022

Any idea when the feature will be ready to use? We use NC at our school und students must not be able to enable a public profile.

I applied the workaround from @shieldwed , but this only applies to existing users.

@Pytal Pytal force-pushed the feat/28139/global-profile-toggle branch 5 times, most recently from 73cf679 to 1383b60 Compare March 11, 2022 04:05
@Pytal Pytal added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 11, 2022
@Pytal Pytal marked this pull request as ready for review March 11, 2022 04:16
@Pytal Pytal requested review from a team and PVince81 and removed request for a team March 11, 2022 04:16
return filter_var(
$account->getProperty(IAccountManager::PROPERTY_PROFILE_ENABLED)->getValue(),
$config->getAppValue('settings', 'profile_enabled_by_default', '1'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should document this somewhere?

Copy link
Contributor

@szaimen szaimen Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And maybe it should be disabled by default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should document this somewhere?

Created a separate issue nextcloud/documentation#8122

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the record from what we talked about in the chat:

  • We are keeping Profile enabled by default
  • Admins can easily disable it with this setting by default, with users still being able to override it
  • New profile fields which are sensitive were a) introduced recently together with the visibility settings and b) not public by default, so if people don't want them to be visible, they didnt set them

@PVince81 PVince81 requested review from artonge and come-nc March 14, 2022 13:23
@szaimen
Copy link
Contributor

szaimen commented Mar 17, 2022

@Pytal can you please rebase? Then lets merge this, I'd say

@Pytal Pytal force-pushed the feat/28139/global-profile-toggle branch from 08ce416 to 99bc520 Compare March 17, 2022 18:08
@szaimen szaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Mar 17, 2022
@szaimen
Copy link
Contributor

szaimen commented Mar 17, 2022

sry Chris but tests are still failing :/

@Pytal Pytal force-pushed the feat/28139/global-profile-toggle branch from 99bc520 to 62066d2 Compare March 17, 2022 22:27
@Pytal
Copy link
Member Author

Pytal commented Mar 17, 2022

Looks unrelated but will rerun for safety

@Pytal Pytal force-pushed the feat/28139/global-profile-toggle branch from 62066d2 to 7fe627e Compare March 18, 2022 02:07
Pytal added 2 commits March 18, 2022 02:55
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@Pytal Pytal force-pushed the feat/28139/global-profile-toggle branch from 7fe627e to 108abd7 Compare March 18, 2022 02:55
@Pytal
Copy link
Member Author

Pytal commented Mar 18, 2022

🟢

@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Mar 18, 2022
@Pytal Pytal merged commit b0fbccc into master Mar 18, 2022
@Pytal Pytal deleted the feat/28139/global-profile-toggle branch March 18, 2022 04:36
@Pytal
Copy link
Member Author

Pytal commented Mar 18, 2022

/backport to stable23

@backportbot-nextcloud
Copy link

backportbot-nextcloud bot commented Mar 18, 2022

The backport to stable23 failed. Please do this backport manually.

#31624

@Pytal Pytal added this to the Nextcloud 24 milestone Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.) feature: settings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User Profile - 3 - Global toggle
8 participants