Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2ba56b5
Fix summary footer position and text contrast
jancborchardt Apr 12, 2021
6be8894
Improve focus feedback for file list actions
jancborchardt Apr 13, 2021
5792250
Add proper labels for personal settings privacy toggles
jancborchardt Apr 13, 2021
73cf806
Fix screenreader label of search icon
jancborchardt Apr 13, 2021
0a3875e
Fix missing label of grid view toggle
jancborchardt Apr 13, 2021
199f736
Fix missing label of Files navigation sublist toggles
jancborchardt Apr 13, 2021
9bb2e8d
Fix accessibility of profile picture section
jancborchardt Apr 15, 2021
b276593
Fix accessibility of federation menu privacy buttons
jancborchardt Apr 15, 2021
f4171c9
Fix avatar actions
nickvergessen Jun 15, 2021
4fbb9b2
Use constants from interface rather than class
danxuliu Jan 29, 2021
2eeac35
Extract default test data to a helper getter
danxuliu Jan 29, 2021
36fa740
Change default test data to values less similar to empty values
danxuliu Jan 29, 2021
7ed78d2
Add more unit tests for setting user settings
danxuliu Jan 29, 2021
6865d51
Respect additional user settings not covered by the controller
danxuliu Jan 29, 2021
ae7eca8
Fix TypeError when "email" is not given in the controller request
danxuliu Jan 31, 2021
44c870a
Fix deleting properties of user settings when not given explicitly
danxuliu Jan 31, 2021
491c031
Add integration tests for searching users in contacts menu
danxuliu Jan 31, 2021
3ae1ec4
Guard against null phone number value
danxuliu Jan 31, 2021
43a9879
Fix active scope not visible in the menu if excluded
danxuliu Feb 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use constants from interface rather than class
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
  • Loading branch information
danxuliu committed Jul 2, 2021
commit 4fbb9b212d71d841ee30f4b538ebf693ac1defe4
4 changes: 2 additions & 2 deletions apps/settings/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,14 +526,14 @@ public function getVerificationCode(string $account, bool $onlyVerificationCode)

switch ($account) {
case 'verify-twitter':
$accountData[IAccountManager::PROPERTY_TWITTER]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
$accountData[IAccountManager::PROPERTY_TWITTER]['verified'] = IAccountManager::VERIFICATION_IN_PROGRESS;
$msg = $this->l10n->t('In order to verify your Twitter account, post the following tweet on Twitter (please make sure to post it without any line breaks):');
$code = $codeMd5;
$type = IAccountManager::PROPERTY_TWITTER;
$accountData[IAccountManager::PROPERTY_TWITTER]['signature'] = $signature;
break;
case 'verify-website':
$accountData[IAccountManager::PROPERTY_WEBSITE]['verified'] = AccountManager::VERIFICATION_IN_PROGRESS;
$accountData[IAccountManager::PROPERTY_WEBSITE]['verified'] = IAccountManager::VERIFICATION_IN_PROGRESS;
$msg = $this->l10n->t('In order to verify your Website, store the following content in your web-root at \'.well-known/CloudIdVerificationCode.txt\' (please make sure that the complete text is in one line):');
$type = IAccountManager::PROPERTY_WEBSITE;
$accountData[IAccountManager::PROPERTY_WEBSITE]['signature'] = $signature;
Expand Down
38 changes: 19 additions & 19 deletions apps/settings/tests/Controller/UsersControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,42 +209,42 @@ public function testSetUserSettings($email, $validEmail, $expectedStatus) {
IAccountManager::PROPERTY_DISPLAYNAME =>
[
'value' => 'Display name',
'scope' => AccountManager::SCOPE_FEDERATED,
'verified' => AccountManager::NOT_VERIFIED,
'scope' => IAccountManager::SCOPE_FEDERATED,
'verified' => IAccountManager::NOT_VERIFIED,
],
IAccountManager::PROPERTY_ADDRESS =>
[
'value' => '',
'scope' => AccountManager::SCOPE_LOCAL,
'verified' => AccountManager::NOT_VERIFIED,
'scope' => IAccountManager::SCOPE_LOCAL,
'verified' => IAccountManager::NOT_VERIFIED,
],
IAccountManager::PROPERTY_WEBSITE =>
[
'value' => '',
'scope' => AccountManager::SCOPE_LOCAL,
'verified' => AccountManager::NOT_VERIFIED,
'scope' => IAccountManager::SCOPE_LOCAL,
'verified' => IAccountManager::NOT_VERIFIED,
],
IAccountManager::PROPERTY_EMAIL =>
[
'value' => '',
'scope' => AccountManager::SCOPE_FEDERATED,
'verified' => AccountManager::NOT_VERIFIED,
'scope' => IAccountManager::SCOPE_FEDERATED,
'verified' => IAccountManager::NOT_VERIFIED,
],
IAccountManager::PROPERTY_AVATAR =>
[
'scope' => AccountManager::SCOPE_FEDERATED
'scope' => IAccountManager::SCOPE_FEDERATED
],
IAccountManager::PROPERTY_PHONE =>
[
'value' => '',
'scope' => AccountManager::SCOPE_LOCAL,
'verified' => AccountManager::NOT_VERIFIED,
'scope' => IAccountManager::SCOPE_LOCAL,
'verified' => IAccountManager::NOT_VERIFIED,
],
IAccountManager::PROPERTY_TWITTER =>
[
'value' => '',
'scope' => AccountManager::SCOPE_LOCAL,
'verified' => AccountManager::NOT_VERIFIED,
'scope' => IAccountManager::SCOPE_LOCAL,
'verified' => IAccountManager::NOT_VERIFIED,
],
]);

Expand Down Expand Up @@ -504,18 +504,18 @@ public function testGetVerificationCode($account, $type, $dataBefore, $expectedD

public function dataTestGetVerificationCode() {
$accountDataBefore = [
IAccountManager::PROPERTY_WEBSITE => ['value' => 'https://nextcloud.com', 'verified' => AccountManager::NOT_VERIFIED],
IAccountManager::PROPERTY_TWITTER => ['value' => '@nextclouders', 'verified' => AccountManager::NOT_VERIFIED, 'signature' => 'theSignature'],
IAccountManager::PROPERTY_WEBSITE => ['value' => 'https://nextcloud.com', 'verified' => IAccountManager::NOT_VERIFIED],
IAccountManager::PROPERTY_TWITTER => ['value' => '@nextclouders', 'verified' => IAccountManager::NOT_VERIFIED, 'signature' => 'theSignature'],
];

$accountDataAfterWebsite = [
IAccountManager::PROPERTY_WEBSITE => ['value' => 'https://nextcloud.com', 'verified' => AccountManager::VERIFICATION_IN_PROGRESS, 'signature' => 'theSignature'],
IAccountManager::PROPERTY_TWITTER => ['value' => '@nextclouders', 'verified' => AccountManager::NOT_VERIFIED, 'signature' => 'theSignature'],
IAccountManager::PROPERTY_WEBSITE => ['value' => 'https://nextcloud.com', 'verified' => IAccountManager::VERIFICATION_IN_PROGRESS, 'signature' => 'theSignature'],
IAccountManager::PROPERTY_TWITTER => ['value' => '@nextclouders', 'verified' => IAccountManager::NOT_VERIFIED, 'signature' => 'theSignature'],
];

$accountDataAfterTwitter = [
IAccountManager::PROPERTY_WEBSITE => ['value' => 'https://nextcloud.com', 'verified' => AccountManager::NOT_VERIFIED],
IAccountManager::PROPERTY_TWITTER => ['value' => '@nextclouders', 'verified' => AccountManager::VERIFICATION_IN_PROGRESS, 'signature' => 'theSignature'],
IAccountManager::PROPERTY_WEBSITE => ['value' => 'https://nextcloud.com', 'verified' => IAccountManager::NOT_VERIFIED],
IAccountManager::PROPERTY_TWITTER => ['value' => '@nextclouders', 'verified' => IAccountManager::VERIFICATION_IN_PROGRESS, 'signature' => 'theSignature'],
];

return [
Expand Down