diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-11-22 17:47:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 17:47:04 +0100 |
commit | 8dcd992ad42bb7b2a3a7a7acab0987579f293e26 (patch) | |
tree | ee8b2af702550754b0de8880999f63a502e521a5 /apps/provisioning_api | |
parent | 603feb98f24c92992da025255b0e125ad9d169ba (diff) | |
parent | f244406ebd54bd8eca160078c8513b57d0316f5b (diff) | |
download | nextcloud-server-8dcd992ad42bb7b2a3a7a7acab0987579f293e26.tar.gz nextcloud-server-8dcd992ad42bb7b2a3a7a7acab0987579f293e26.zip |
Merge pull request #34940 from nextcloud/feat/add-mastodon
Add mastodon and reorganize profile info section
Diffstat (limited to 'apps/provisioning_api')
5 files changed, 38 insertions, 4 deletions
diff --git a/apps/provisioning_api/composer/autoload.php b/apps/provisioning_api/composer/autoload.php index d01dfa2c74b..539f62b3fe5 100644 --- a/apps/provisioning_api/composer/autoload.php +++ b/apps/provisioning_api/composer/autoload.php @@ -3,8 +3,21 @@ // autoload.php @generated by Composer if (PHP_VERSION_ID < 50600) { - echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - exit(1); + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + trigger_error( + $err, + E_USER_ERROR + ); } require_once __DIR__ . '/composer/autoload_real.php'; diff --git a/apps/provisioning_api/composer/composer/installed.php b/apps/provisioning_api/composer/composer/installed.php index 5f83b3f2bff..ee1748532a9 100644 --- a/apps/provisioning_api/composer/composer/installed.php +++ b/apps/provisioning_api/composer/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '144514e49e25b7b123fd535902fee97fa39fb446', + 'reference' => 'e35bcc9381246a8ec3da96e78e9771ef6044a6d4', 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '144514e49e25b7b123fd535902fee97fa39fb446', + 'reference' => 'e35bcc9381246a8ec3da96e78e9771ef6044a6d4', 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index 0fc2bb6f0d3..668b86c059a 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -181,6 +181,7 @@ abstract class AUserData extends OCSController { IAccountManager::PROPERTY_ADDRESS, IAccountManager::PROPERTY_WEBSITE, IAccountManager::PROPERTY_TWITTER, + IAccountManager::PROPERTY_FEDIVERSE, IAccountManager::PROPERTY_ORGANISATION, IAccountManager::PROPERTY_ROLE, IAccountManager::PROPERTY_HEADLINE, diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 0f9ffcbadf4..434912f32aa 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -621,6 +621,7 @@ class UsersController extends AUserData { $permittedFields[] = IAccountManager::PROPERTY_ADDRESS; $permittedFields[] = IAccountManager::PROPERTY_WEBSITE; $permittedFields[] = IAccountManager::PROPERTY_TWITTER; + $permittedFields[] = IAccountManager::PROPERTY_FEDIVERSE; $permittedFields[] = IAccountManager::PROPERTY_ORGANISATION; $permittedFields[] = IAccountManager::PROPERTY_ROLE; $permittedFields[] = IAccountManager::PROPERTY_HEADLINE; @@ -782,6 +783,7 @@ class UsersController extends AUserData { $permittedFields[] = IAccountManager::PROPERTY_ADDRESS; $permittedFields[] = IAccountManager::PROPERTY_WEBSITE; $permittedFields[] = IAccountManager::PROPERTY_TWITTER; + $permittedFields[] = IAccountManager::PROPERTY_FEDIVERSE; $permittedFields[] = IAccountManager::PROPERTY_ORGANISATION; $permittedFields[] = IAccountManager::PROPERTY_ROLE; $permittedFields[] = IAccountManager::PROPERTY_HEADLINE; @@ -791,6 +793,7 @@ class UsersController extends AUserData { $permittedFields[] = IAccountManager::PROPERTY_ADDRESS . self::SCOPE_SUFFIX; $permittedFields[] = IAccountManager::PROPERTY_WEBSITE . self::SCOPE_SUFFIX; $permittedFields[] = IAccountManager::PROPERTY_TWITTER . self::SCOPE_SUFFIX; + $permittedFields[] = IAccountManager::PROPERTY_FEDIVERSE . self::SCOPE_SUFFIX; $permittedFields[] = IAccountManager::PROPERTY_ORGANISATION . self::SCOPE_SUFFIX; $permittedFields[] = IAccountManager::PROPERTY_ROLE . self::SCOPE_SUFFIX; $permittedFields[] = IAccountManager::PROPERTY_HEADLINE . self::SCOPE_SUFFIX; @@ -827,6 +830,7 @@ class UsersController extends AUserData { $permittedFields[] = IAccountManager::PROPERTY_ADDRESS; $permittedFields[] = IAccountManager::PROPERTY_WEBSITE; $permittedFields[] = IAccountManager::PROPERTY_TWITTER; + $permittedFields[] = IAccountManager::PROPERTY_FEDIVERSE; $permittedFields[] = IAccountManager::PROPERTY_ORGANISATION; $permittedFields[] = IAccountManager::PROPERTY_ROLE; $permittedFields[] = IAccountManager::PROPERTY_HEADLINE; @@ -955,6 +959,7 @@ class UsersController extends AUserData { case IAccountManager::PROPERTY_ADDRESS: case IAccountManager::PROPERTY_WEBSITE: case IAccountManager::PROPERTY_TWITTER: + case IAccountManager::PROPERTY_FEDIVERSE: case IAccountManager::PROPERTY_ORGANISATION: case IAccountManager::PROPERTY_ROLE: case IAccountManager::PROPERTY_HEADLINE: @@ -999,6 +1004,7 @@ class UsersController extends AUserData { case IAccountManager::PROPERTY_ADDRESS . self::SCOPE_SUFFIX: case IAccountManager::PROPERTY_WEBSITE . self::SCOPE_SUFFIX: case IAccountManager::PROPERTY_TWITTER . self::SCOPE_SUFFIX: + case IAccountManager::PROPERTY_FEDIVERSE . self::SCOPE_SUFFIX: case IAccountManager::PROPERTY_ORGANISATION . self::SCOPE_SUFFIX: case IAccountManager::PROPERTY_ROLE . self::SCOPE_SUFFIX: case IAccountManager::PROPERTY_HEADLINE . self::SCOPE_SUFFIX: diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 09a7eeb1a11..d0e808c990f 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -1008,6 +1008,7 @@ class UsersControllerTest extends TestCase { IAccountManager::PROPERTY_ADDRESS => ['value' => 'address'], IAccountManager::PROPERTY_PHONE => ['value' => 'phone'], IAccountManager::PROPERTY_TWITTER => ['value' => 'twitter'], + IAccountManager::PROPERTY_FEDIVERSE => ['value' => 'fediverse'], IAccountManager::PROPERTY_WEBSITE => ['value' => 'website'], IAccountManager::PROPERTY_ORGANISATION => ['value' => 'organisation'], IAccountManager::PROPERTY_ROLE => ['value' => 'role'], @@ -1075,6 +1076,7 @@ class UsersControllerTest extends TestCase { 'address' => 'address', 'website' => 'website', 'twitter' => 'twitter', + 'fediverse' => 'fediverse', 'groups' => ['group0', 'group1', 'group2'], 'language' => 'de', 'locale' => null, @@ -1186,6 +1188,7 @@ class UsersControllerTest extends TestCase { IAccountManager::PROPERTY_ADDRESS => ['value' => 'address'], IAccountManager::PROPERTY_PHONE => ['value' => 'phone'], IAccountManager::PROPERTY_TWITTER => ['value' => 'twitter'], + IAccountManager::PROPERTY_FEDIVERSE => ['value' => 'fediverse'], IAccountManager::PROPERTY_WEBSITE => ['value' => 'website'], IAccountManager::PROPERTY_ORGANISATION => ['value' => 'organisation'], IAccountManager::PROPERTY_ROLE => ['value' => 'role'], @@ -1214,6 +1217,7 @@ class UsersControllerTest extends TestCase { 'address' => 'address', 'website' => 'website', 'twitter' => 'twitter', + 'fediverse' => 'fediverse', 'groups' => [], 'language' => 'da', 'locale' => null, @@ -1364,6 +1368,7 @@ class UsersControllerTest extends TestCase { IAccountManager::PROPERTY_ADDRESS => ['value' => 'address'], IAccountManager::PROPERTY_PHONE => ['value' => 'phone'], IAccountManager::PROPERTY_TWITTER => ['value' => 'twitter'], + IAccountManager::PROPERTY_FEDIVERSE => ['value' => 'fediverse'], IAccountManager::PROPERTY_WEBSITE => ['value' => 'website'], IAccountManager::PROPERTY_ORGANISATION => ['value' => 'organisation'], IAccountManager::PROPERTY_ROLE => ['value' => 'role'], @@ -1391,6 +1396,7 @@ class UsersControllerTest extends TestCase { 'address' => 'address', 'website' => 'website', 'twitter' => 'twitter', + 'fediverse' => 'fediverse', 'groups' => [], 'language' => 'ru', 'locale' => null, @@ -1582,6 +1588,7 @@ class UsersControllerTest extends TestCase { public function selfEditChangePropertyProvider() { return [ [IAccountManager::PROPERTY_TWITTER, '@oldtwitter', '@newtwitter'], + [IAccountManager::PROPERTY_FEDIVERSE, '@oldFediverse@floss.social', '@newFediverse@floss.social'], [IAccountManager::PROPERTY_PHONE, '1234', '12345'], [IAccountManager::PROPERTY_ADDRESS, 'Something street 2', 'Another street 3'], [IAccountManager::PROPERTY_WEBSITE, 'https://examplesite1', 'https://examplesite2'], @@ -1658,6 +1665,7 @@ class UsersControllerTest extends TestCase { [IAccountManager::PROPERTY_DISPLAYNAME, IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_FEDERATED], [IAccountManager::PROPERTY_EMAIL, IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_FEDERATED], [IAccountManager::PROPERTY_TWITTER, IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_FEDERATED], + [IAccountManager::PROPERTY_FEDIVERSE, IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_FEDERATED], [IAccountManager::PROPERTY_PHONE, IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_FEDERATED], [IAccountManager::PROPERTY_ADDRESS, IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_FEDERATED], [IAccountManager::PROPERTY_WEBSITE, IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_FEDERATED], @@ -3543,6 +3551,7 @@ class UsersControllerTest extends TestCase { 'address' => 'address', 'website' => 'website', 'twitter' => 'twitter', + 'fediverse' => 'fediverse', 'organisation' => 'organisation', 'role' => 'role', 'headline' => 'headline', @@ -3560,6 +3569,7 @@ class UsersControllerTest extends TestCase { 'address' => 'address', 'website' => 'website', 'twitter' => 'twitter', + 'fediverse' => 'fediverse', 'organisation' => 'organisation', 'role' => 'role', 'headline' => 'headline', @@ -3622,6 +3632,7 @@ class UsersControllerTest extends TestCase { 'address' => 'address', 'website' => 'website', 'twitter' => 'twitter', + 'fediverse' => 'fediverse', 'displayname' => 'Demo User', 'organisation' => 'organisation', 'role' => 'role', @@ -3946,6 +3957,7 @@ class UsersControllerTest extends TestCase { IAccountManager::PROPERTY_ADDRESS, IAccountManager::PROPERTY_WEBSITE, IAccountManager::PROPERTY_TWITTER, + IAccountManager::PROPERTY_FEDIVERSE, IAccountManager::PROPERTY_ORGANISATION, IAccountManager::PROPERTY_ROLE, IAccountManager::PROPERTY_HEADLINE, @@ -3960,6 +3972,7 @@ class UsersControllerTest extends TestCase { IAccountManager::PROPERTY_ADDRESS, IAccountManager::PROPERTY_WEBSITE, IAccountManager::PROPERTY_TWITTER, + IAccountManager::PROPERTY_FEDIVERSE, IAccountManager::PROPERTY_ORGANISATION, IAccountManager::PROPERTY_ROLE, IAccountManager::PROPERTY_HEADLINE, @@ -3973,6 +3986,7 @@ class UsersControllerTest extends TestCase { IAccountManager::PROPERTY_ADDRESS, IAccountManager::PROPERTY_WEBSITE, IAccountManager::PROPERTY_TWITTER, + IAccountManager::PROPERTY_FEDIVERSE, IAccountManager::PROPERTY_ORGANISATION, IAccountManager::PROPERTY_ROLE, IAccountManager::PROPERTY_HEADLINE, |