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

Verify personal data #3869

Merged
merged 50 commits into from
Apr 29, 2017
Merged

Verify personal data #3869

merged 50 commits into from
Apr 29, 2017

Conversation

schiessle
Copy link
Member

@schiessle schiessle commented Mar 16, 2017

Allow users to verify their email address, twitter account and webpage for the lookup server

Fix #3127

@schiessle schiessle added this to the Nextcloud 12.0 milestone Mar 16, 2017
@mention-bot
Copy link

@schiessle, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @MorrisJobke and @jancborchardt to be potential reviewers.

@@ -28,18 +28,20 @@
\OC::$server->getAppDataDir('identityproof'),
\OC::$server->getCrypto()
);

$config = \OC::$server->getConfig();
$lookupServer = $config->getSystemValue('lookup_server', '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No default value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value is that nothing is configured and than the lookup connector will fall back to the default URL.

/**
* use a custom lookup server to publish user data
*/
'lookup_server' => 'https://lookup.nextcloud.com/users',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the /users needs to be removed here.

/** @var Signer */
private $signer;
/** @var IJobList */
private $jobList;
/** @var string URL point to lookup server */
private $lookupServer = 'https://lookup.nextcloud.com/users';
private $lookupServer = 'https://lookup.nextcloud.com';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the default while fetching from the config instead.

Copy link
Member Author

@schiessle schiessle Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to have the default defined in one place instead of spread around in multiple places. This makes it much easier to change it if necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem I see with this approach: How to set "no lookup server"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is always one configured lookup server. That's also the case for Nc11. You can disable the whole functionality in the admin settings, no need to play around with config.php variables.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can still have the default server stored in a const, if you need it in several places, and use it as default parameter. It's a more intuitive and especially consistent.

Signer $signer,
IJobList $jobList) {
IJobList $jobList,
$lookupServer = '') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to: #3869 (comment)
In most cases people will just use the default value. People who use this class shouldn't have to think about it or even know the default server.

@schiessle
Copy link
Member Author

Thanks for the early review. But keep in mind that most code will probably change before it is ready to review. That's a early development branch.

@schiessle
Copy link
Member Author

@jancborchardt please don't forget the icons we discussed during the hackweek.... Thanks!

@MorrisJobke
Copy link
Member

@jancborchardt Please fix the layout:

bildschirmfoto 2017-04-07 um 12 51 21

@schiessle
Copy link
Member Author

@MorrisJobke for now the text label are just there to allow me to work on the actual functionality, I didn't put a lot of energy in getting the layout right (although I have to say that it looks better on my screen 😉 ).

Still waiting for some nice icons by @jancborchardt. Bonus points for Jan if he adds them directly to this branch with the right layout 😉

@codecov
Copy link

codecov bot commented Apr 18, 2017

Codecov Report

Merging #3869 into master will decrease coverage by 23.05%.
The diff coverage is 0%.

@@              Coverage Diff              @@
##             master    #3869       +/-   ##
=============================================
- Coverage     54.34%   31.29%   -23.06%     
- Complexity    21998    22058       +60     
=============================================
  Files          1359     1360        +1     
  Lines         84340    84009      -331     
  Branches       1335     1335               
=============================================
- Hits          45838    26290    -19548     
- Misses        38502    57719    +19217
Impacted Files Coverage Δ Complexity Δ
settings/personal.php 0% <0%> (ø) 0 <0> (ø) ⬇️
settings/templates/personal.php 0% <0%> (ø) 0 <0> (ø) ⬇️
lib/private/Accounts/Hooks.php 0% <0%> (-100%) 14 <0> (ø)
settings/Controller/UsersController.php 0% <0%> (-64.03%) 94 <7> (+7)
lib/private/Accounts/AccountManager.php 0% <0%> (-68.19%) 34 <25> (+24)
settings/BackgroundJobs/VerifyUserData.php 0% <0%> (ø) 25 <25> (?)
...es_sharing/lib/Controller/ShareesAPIController.php 0% <0%> (-68.44%) 101 <0> (ø)
...lookup_server_connector/lib/UpdateLookupServer.php 0% <0%> (ø) 19 <0> (+5) ⬆️
apps/lookup_server_connector/appinfo/app.php 0% <0%> (ø) 0 <0> (ø) ⬇️
...p_server_connector/lib/BackgroundJobs/RetryJob.php 0% <0%> (ø) 6 <3> (ø) ⬇️
... and 368 more

@MorrisJobke
Copy link
Member

@jancborchardt Please have a look at this or this will not land in 12.

@schiessle schiessle force-pushed the verify-personal-data branch 2 times, most recently from 48c6ae2 to 69d179f Compare April 21, 2017 16:01
@jancborchardt
Copy link
Member

Sorry, have been drowning in notifications – will check it out.

@schiessle
Copy link
Member Author

@jancborchardt Thanks. As discussed we need three icons:

  • not verified
  • verification in progress
  • verified

@schiessle
Copy link
Member Author

@jancborchardt I just pushed the last changes for the code. The strings "verification in progress", "verified", "click to verify" here 24e1395#diff-e999cb367e8eac4edfd688b687c55730L114 need to be replaced with nice looking icons. Maybe it make sense to keep the strings as a tooltip.

Email has the status "verification in progress" and "verifed" only and is not clickable because email verification doesn't need any additional user interaction. The lookup server send automatically a verification mail if you set an new email address and we check in the background if the verification was completed.

@jancborchardt
Copy link
Member

@schiessle what do you think about these icons:
verification

  1. Click to verify
  2. Verification in progress
  3. Verified
  4. and 5: Error state – which one do you prefer?

@schiessle
Copy link
Member Author

@jancborchardt looks nice. I'm not sure if we need a error state. My plan was to just go back from "verify in progress" to "not verified" and then the user can start again. Can you commit the icons? Thanks!

@jancborchardt
Copy link
Member

@schiessle I added the icons and also would say we simplify the wording to:

  • Verify (cause »click« isn’t on mobile ;)
  • Verifying …
  • Verified

Can you make all the changes for that, let me know, and then I fix the last layout issues?

@schiessle
Copy link
Member Author

@jancborchardt verification buttons are in and they look really nice! 😃

Can you have a look at the layout, there are still some glitches on different window sizes. Thanks!

schiessle and others added 21 commits April 28, 2017 23:41
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Jan-Christoph Borchardt <[email protected]>
Signed-off-by: Jan-Christoph Borchardt <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Jan-Christoph Borchardt <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
… not only after page reload

Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Roeland Jago Douma <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
@MorrisJobke
Copy link
Member

I rebased to trigger CI - restarting is not possible for the jobs before the drone mess up. :/

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works:+1:

Signed-off-by: Morris Jobke <[email protected]>
@MorrisJobke
Copy link
Member

unit tests run fine -> merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants