aboutsummaryrefslogtreecommitdiffstats
path: root/core/Db/ProfileConfig.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-10-23 12:28:48 +0200
committerJoas Schilling <coding@schilljs.com>2023-10-23 12:56:31 +0200
commit2353d3cd5c1bc01c7ae4da9cd1c341f795982686 (patch)
tree5d952ea8b12b2e72bc1a364503616093feca5253 /core/Db/ProfileConfig.php
parent61143644a41a42ee7f94c1a3d25050e492975c4d (diff)
downloadnextcloud-server-2353d3cd5c1bc01c7ae4da9cd1c341f795982686.tar.gz
nextcloud-server-2353d3cd5c1bc01c7ae4da9cd1c341f795982686.zip
feat(profile): Add public interface for profile manager so apps can check config
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Db/ProfileConfig.php')
-rw-r--r--core/Db/ProfileConfig.php29
1 files changed, 11 insertions, 18 deletions
diff --git a/core/Db/ProfileConfig.php b/core/Db/ProfileConfig.php
index 3ebfe02ca79..ea0507df982 100644
--- a/core/Db/ProfileConfig.php
+++ b/core/Db/ProfileConfig.php
@@ -26,10 +26,10 @@ declare(strict_types=1);
namespace OC\Core\Db;
+use OCP\Profile\IProfileManager;
use function Safe\json_decode;
use function Safe\json_encode;
use \JsonSerializable;
-use OCP\Accounts\IAccountManager;
use OCP\AppFramework\Db\Entity;
use OCP\Profile\ParameterDoesNotExistException;
@@ -44,48 +44,41 @@ class ProfileConfig extends Entity implements JsonSerializable {
* Visible to users, guests, and public access
*
* @since 23.0.0
+ * @deprecated 28.0.0 Use {@see IProfileManager::VISIBILITY_SHOW} instead
*/
- public const VISIBILITY_SHOW = 'show';
+ public const VISIBILITY_SHOW = IProfileManager::VISIBILITY_SHOW;
/**
* Visible to users and guests
*
* @since 23.0.0
+ * @deprecated 28.0.0 Use {@see IProfileManager::VISIBILITY_SHOW_USERS_ONLY} instead
*/
- public const VISIBILITY_SHOW_USERS_ONLY = 'show_users_only';
+ public const VISIBILITY_SHOW_USERS_ONLY = IProfileManager::VISIBILITY_SHOW_USERS_ONLY;
/**
* Visible to nobody
*
* @since 23.0.0
+ * @deprecated 28.0.0 Use {@see IProfileManager::VISIBILITY_HIDE} instead
*/
- public const VISIBILITY_HIDE = 'hide';
+ public const VISIBILITY_HIDE = IProfileManager::VISIBILITY_HIDE;
/**
* Default account property visibility
*
* @since 23.0.0
+ * @deprecated 28.0.0 Use {@see IProfileManager::DEFAULT_PROPERTY_VISIBILITY} instead
*/
- public const DEFAULT_PROPERTY_VISIBILITY = [
- IAccountManager::PROPERTY_ADDRESS => self::VISIBILITY_SHOW_USERS_ONLY,
- IAccountManager::PROPERTY_AVATAR => self::VISIBILITY_SHOW,
- IAccountManager::PROPERTY_BIOGRAPHY => self::VISIBILITY_SHOW,
- IAccountManager::PROPERTY_DISPLAYNAME => self::VISIBILITY_SHOW,
- IAccountManager::PROPERTY_HEADLINE => self::VISIBILITY_SHOW,
- IAccountManager::PROPERTY_ORGANISATION => self::VISIBILITY_SHOW,
- IAccountManager::PROPERTY_ROLE => self::VISIBILITY_SHOW,
- IAccountManager::PROPERTY_EMAIL => self::VISIBILITY_SHOW_USERS_ONLY,
- IAccountManager::PROPERTY_PHONE => self::VISIBILITY_SHOW_USERS_ONLY,
- IAccountManager::PROPERTY_TWITTER => self::VISIBILITY_SHOW,
- IAccountManager::PROPERTY_WEBSITE => self::VISIBILITY_SHOW,
- ];
+ public const DEFAULT_PROPERTY_VISIBILITY = IProfileManager::DEFAULT_PROPERTY_VISIBILITY;
/**
* Default visibility
*
* @since 23.0.0
+ * @deprecated 28.0.0 Use {@see IProfileManager::DEFAULT_VISIBILITY} instead
*/
- public const DEFAULT_VISIBILITY = self::VISIBILITY_SHOW_USERS_ONLY;
+ public const DEFAULT_VISIBILITY = IProfileManager::DEFAULT_VISIBILITY;
/** @var string */
protected $userId;