Skip to content

Commit 0918817

Browse files
committed
Add documentation for the default_property_scope config.php key
Signed-off-by: Thomas Citharel <[email protected]>
1 parent 939b111 commit 0918817

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

admin_manual/configuration_user/profile_configuration.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,58 @@ To disable profile globally add the following line to your ``config.php``
3434

3535
Please refer to :doc:`../configuration_server/config_sample_php_parameters` for
3636
all available ``config.php`` options.
37+
38+
Property scopes
39+
---------------
40+
41+
User properties (Full name, Address, Website, Role, …) have specific visibility scopes (Private, Local, Federated, Published).
42+
43+
The visibility scopes are explained below:
44+
45+
:Private:
46+
Contact details visible locally only
47+
:Local:
48+
Contact details visible locally and through public link access on local instance
49+
:Federated:
50+
Contact details visible locally, through public link access and on trusted federated servers.
51+
:Published:
52+
Contact details visible locally, through public link access, on trusted federated servers and published to the public lookup server.
53+
54+
The default values for each property for each new user is listed below, but you should consult the declaration of the ``DEFAULT_SCOPES`` constant in the ``OC\Accounts\AccountManager`` class (`see the code <https://github.com/nextcloud/server/blob/master/lib/private/Accounts/AccountManager.php>`_) to make sure these are up-to-date.
55+
56+
+--------------+--------------------------+
57+
| Property | Default visibility scope |
58+
+==============+==========================+
59+
| Full name | Federated |
60+
+--------------+--------------------------+
61+
| Address | Local |
62+
+--------------+--------------------------+
63+
| Website | Local |
64+
+--------------+--------------------------+
65+
| Email | Federated |
66+
+--------------+--------------------------+
67+
| Avatar | Federated |
68+
+--------------+--------------------------+
69+
| Phone | Local |
70+
+--------------+--------------------------+
71+
| Twitter | Local |
72+
+--------------+--------------------------+
73+
| Organisation | Local |
74+
+--------------+--------------------------+
75+
| Role | Local |
76+
+--------------+--------------------------+
77+
| Headline | Local |
78+
+--------------+--------------------------+
79+
| Biography | Local |
80+
+--------------+--------------------------+
81+
82+
If you'd like to override the value for one or several default visibility scopes, use the ``account_manager.default_property_scope`` ``config.php`` configuration key, which defaults to an empty array:
83+
84+
.. code-block:: php
85+
86+
'account_manager.default_property_scope' => [
87+
\OCP\Accounts\IAccountManager::PROPERTY_PHONE => \OCP\Accounts\IAccountManager::SCOPE_PRIVATE
88+
\OCP\Accounts\IAccountManager::PROPERTY_ROLE => \OCP\Accounts\IAccountManager::SCOPE_FEDERATED
89+
]
90+
91+
In the above example, the phone and role properties are respectively overritten to the private and federated scopes. Note that these changes will only apply to *new* users, not existing ones.

0 commit comments

Comments
 (0)