Skip to content

Toggle profile globally - #29372

Merged
Pytal merged 2 commits into
masterfrom
feat/28139/global-profile-toggle
Mar 18, 2022
Merged

Toggle profile globally#29372
Pytal merged 2 commits into
masterfrom
feat/28139/global-profile-toggle

Conversation

@Pytal

@PytalPytal commented Oct 21, 2021

Copy link
Copy Markdown
Member

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
@PytalPytal self-assigned this Oct 21, 2021
@PytalPytal 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
@PytalPytal mentioned this pull request Oct 21, 2021
20 tasks
@jolly-jump

jolly-jump commented Dec 7, 2021

Copy link
Copy Markdown

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

Pytal commented Dec 9, 2021

Copy link
Copy Markdown
MemberAuthor

@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
Pytalforce-pushed the feat/28139/global-profile-toggle branch 2 times, most recently from 99f8fe7 to 13d2cb1CompareDecember 10, 2021 20:53
@shieldwed

Copy link
Copy Markdown

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"}', '$'));

@Pytal
Pytalforce-pushed the feat/28139/global-profile-toggle branch 3 times, most recently from 2bfe1c9 to a0d0460CompareDecember 17, 2021 03:44
@kroerig

Copy link
Copy Markdown

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
Pytalforce-pushed the feat/28139/global-profile-toggle branch 5 times, most recently from 73cf679 to 1383b60CompareMarch 11, 2022 04:05
@PytalPytal 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 teamMarch 11, 2022 04:16
return filter_var(
$account->getProperty(IAccountManager::PROPERTY_PROFILE_ENABLED)->getValue(),
$config->getAppValue('settings', 'profile_enabled_by_default', '1'),

Copy link
Copy Markdown
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?

@szaimenszaimenMar 14, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
MemberAuthor

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
Copy Markdown
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-ncMarch 14, 2022 13:23
Comment threadlib/private/Profile/TProfileHelper.php
Comment threadlib/private/Profile/ProfileManager.php
@szaimen

Copy link
Copy Markdown
Contributor

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

@Pytal
Pytalforce-pushed the feat/28139/global-profile-toggle branch from 08ce416 to 99bc520CompareMarch 17, 2022 18:08
@szaimenszaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Mar 17, 2022
@szaimen

szaimen commented Mar 17, 2022

Copy link
Copy Markdown
Contributor

sry Chris but tests are still failing :/

@Pytal
Pytalforce-pushed the feat/28139/global-profile-toggle branch from 99bc520 to 62066d2CompareMarch 17, 2022 22:27
@Pytal

Copy link
Copy Markdown
MemberAuthor

Looks unrelated but will rerun for safety

@Pytal
Pytalforce-pushed the feat/28139/global-profile-toggle branch from 62066d2 to 7fe627eCompareMarch 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
Pytalforce-pushed the feat/28139/global-profile-toggle branch from 7fe627e to 108abd7CompareMarch 18, 2022 02:55
@Pytal

Copy link
Copy Markdown
MemberAuthor

🟢

@PytalPytal 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 masterMar 18, 2022
@Pytal
Pytal deleted the feat/28139/global-profile-toggle branch March 18, 2022 04:36
@Pytal

Copy link
Copy Markdown
MemberAuthor

/backport to stable23

@backportbot-nextcloud

backportbot-nextcloudBot commented Mar 18, 2022

Copy link
Copy Markdown

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

#31624

@PytalPytal added this to the Nextcloud 24 milestone Mar 18, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishenhancementfeature: profilePRs 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

@Pytal@jolly-jump@shieldwed@kroerig@skjnldsv@szaimen@jancborchardt@artonge