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

Tweak the default scopes for Accounts #6582

Closed
tcitworld opened this issue Sep 20, 2017 · 14 comments · Fixed by #31623
Closed

Tweak the default scopes for Accounts #6582

tcitworld opened this issue Sep 20, 2017 · 14 comments · Fixed by #31623

Comments

@tcitworld
Copy link
Member

Currently the following default scopes for new accounts are defined inside AccountManager. We should let the server admin define them through the administration panel or config.php.
This is especially important on instances where users don't know each other.

self::PROPERTY_DISPLAYNAME =>
    [
        'value' => $user->getDisplayName(),
        'scope' => self::VISIBILITY_CONTACTS_ONLY,
        'verified' => self::NOT_VERIFIED,
    ],
self::PROPERTY_ADDRESS =>
    [
        'value' => '',
        'scope' => self::VISIBILITY_PRIVATE,
        'verified' => self::NOT_VERIFIED,
    ],
self::PROPERTY_WEBSITE =>
    [
        'value' => '',
        'scope' => self::VISIBILITY_PRIVATE,
        'verified' => self::NOT_VERIFIED,
    ],
self::PROPERTY_EMAIL =>
    [
        'value' => $user->getEMailAddress(),
        'scope' => self::VISIBILITY_CONTACTS_ONLY,
        'verified' => self::NOT_VERIFIED,
    ],
self::PROPERTY_AVATAR =>
    [
        'scope' => self::VISIBILITY_CONTACTS_ONLY
    ],
self::PROPERTY_PHONE =>
    [
        'value' => '',
        'scope' => self::VISIBILITY_PRIVATE,
        'verified' => self::NOT_VERIFIED,
    ],
self::PROPERTY_TWITTER =>
    [
        'value' => '',
        'scope' => self::VISIBILITY_PRIVATE,
        'verified' => self::NOT_VERIFIED,
    ],
@tcitworld tcitworld added 1. to develop Accepted and waiting to be taken care of feature: users and groups labels Sep 20, 2017
@tcitworld tcitworld self-assigned this Sep 20, 2017
@tcitworld
Copy link
Member Author

Probably a duplicate of #6578.

@MorrisJobke
Copy link
Member

cc @nextcloud/sharing

@MorrisJobke
Copy link
Member

@nextcloud/designers

@schiessle
Copy link
Member

That was chosen by purpose because this was the default even before we introduced the setting. So we kept it as default in order not to break known behavior.

@jancborchardt
Copy link
Member

What are you exactly suggesting we tweak from the current state? Which default visibility should be changed to what?

@tcitworld
Copy link
Member Author

I didn't ask to change the default ones, I asked for the possibility for the admin to change them. In my case, email would also be VISIBILITY_PRIVATE.

@jancborchardt
Copy link
Member

Ok, seems to make sense security-wise. We could have it as a setting in the config file, but not necessary in the interface.

@schiessle?

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@codeshell
Copy link

codeshell commented Sep 25, 2018

Any update on this issue? Seems pretty important to me as this yet unchangeable default probably renders a lot of installations non-compliant in terms of data protection regulations.

Think of a nextcloud instance that allows users to create profiles / login via social accounts. The admin cannot prevent the e-mail address of new users from being automatically exposed to existing users. As most users won't be aware of this default setting and keep it, this means that the e-mail adresses of most existing users are immidiately exposed / available to a new user. He/she doesn't even have to belong to a group. That's most certainly even worse than how social networks deal with social data.

Not meant as a rant but a friendly request to review the priority of this issue.

Doesn't need the social login example to become relevant but it makes it even more obvious.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Sep 25, 2018
@simon511000
Copy link

Up ?

@stefandesu
Copy link

I arrived at this issue now as well and I don't understand how this has not been fixed yet. I'm using LDAP for authentication which means that Nextcloud shows the email addresses of all users, even if they haven't logged into Nextcloud yet (so they didn't even have the chance to disable email sharing). I will probably change this in code even though it might get overridden by an update because this seems super important to me.

@kesselb
Copy link
Contributor

kesselb commented Feb 8, 2020

If someone want's to pick this up:

protected function buildDefaultUserRecord(IUser $user) {

This method is called if no configuration for a user account is found. For reading a system configuration value at this place the constructor must be changed and IConfig injected as dependency and stored as class member. Next step is to read a value from config.php with getSystemValue and merge it with the default values. Probably not bad do check if the provided values are valid (e.g. it's a array with value, scope and verified). Please don't forget to update the tests. To change the existing configuration probably some command would be necessary.

Happy hacking 😎

@fetfets

This comment has been minimized.

@juliushaertl

This comment has been minimized.

tcitworld added a commit that referenced this issue Apr 26, 2020
tcitworld added a commit that referenced this issue Apr 26, 2020
tcitworld added a commit that referenced this issue Apr 26, 2020
tcitworld added a commit that referenced this issue Apr 26, 2020
tcitworld added a commit that referenced this issue Apr 27, 2020
@MohammedNoureldin
Copy link

Can this be configured also for LDAP users? the email of LDAP users is by default hidden, but I want it to be visible. How can it be done? though the code looks like this in AccountManager.php:

image

tcitworld added a commit that referenced this issue Mar 18, 2022
tcitworld added a commit that referenced this issue Mar 18, 2022
tcitworld added a commit that referenced this issue Apr 29, 2022
tcitworld added a commit that referenced this issue May 12, 2022
tcitworld added a commit that referenced this issue May 16, 2022
backportbot-nextcloud bot pushed a commit that referenced this issue May 17, 2022
backportbot-nextcloud bot pushed a commit that referenced this issue May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet