Improve user/x/openid_sites

alex_b - March 9, 2009 - 20:57
Project:OpenID Provider
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:anarcat
Status:needs review
Issue tags:drupal.org identity, drupal.org redesign, Usability
Description

user/x/openid_sites should be a table with

Site|Always approve|Last access

rather than the current list with unlabeled check boxes.

http://img.skitch.com/20090309-x68fsx3f1bfk8c7dx87pa696ni.preview.jpg

#1

alex_b - March 9, 2009 - 20:58

#2

Aron Novak - March 10, 2009 - 13:30
Status:active» needs review

Here is the patch which implements this style of openid_sites listing and UI.

AttachmentSize
openid_provider_sites_page.patch 4.06 KB

#3

Chris Johnson - March 10, 2009 - 17:56

Nice improvement!

#4

Gábor Hojtsy - March 10, 2009 - 19:34

Marked http://drupal.org/node/395010 as duplicate.

#5

anarcat - March 11, 2009 - 01:46
Status:needs review» needs work

patch doesn't apply cleanly.

$ patch < openid_provider_sites_page.patch
patching file openid_provider.module
Hunk #1 succeeded at 62 with fuzz 2 (offset 6 lines).
patching file openid_provider.pages.inc
Hunk #1 succeeded at 79 (offset -2 lines).
Hunk #2 FAILED at 116.
1 out of 2 hunks FAILED -- saving rejects to file openid_provider.pages.inc.rej

#6

anarcat - March 11, 2009 - 01:56

This patch applies cleanly on head. But it seems to reverse the way the checkbox behave. The checkboxes are severly broken: they don't persist and don't seem to do anything.

AttachmentSize
openid_provider_sites_page.patch 3.92 KB

#7

anarcat - March 11, 2009 - 02:23
Assigned to:Anonymous» anarcat

So I have improved the patch so that it actually works. I have also made the links clickable and improved the help by removing the negation in the text.

The original patch also removed the "No sites yet" behavior when the openid hasn't been used, that is not yet fixed and the form is likely to look odd when the openid_provider hasn't been used.

AttachmentSize
openid_provider_sites_page.patch 4.04 KB

#8

anarcat - March 11, 2009 - 03:24
Assigned to:anarcat» Anonymous
Status:needs work» needs review

I have built another patch which adds the "Deny" feature. It turns the checkboxes into radios and allows the user to deny access to some providers altogether.

AttachmentSize
openid_provider_sites_page.patch 10.26 KB

#9

anarcat - March 11, 2009 - 03:29

Small tweak: remove debugging code.

AttachmentSize
openid_provider_sites_page.patch 10.27 KB

#10

anarcat - March 11, 2009 - 03:32

I tested this on our provider against the D6 openid.module and it works well.

#11

anarcat - March 11, 2009 - 03:53

One last try: this one fixes the documentation in the form.

AttachmentSize
openid_provider_sites_page.patch 10.34 KB

#12

anarcat - March 13, 2009 - 00:42
Assigned to:Anonymous» anarcat
Status:needs review» needs work

I'm reworking this.

#13

anarcat - March 13, 2009 - 00:46
Status:needs work» needs review

I think this is really my final jab at it now. I rerolled the patch so it applies cleanly again, cleaned up a little bit of code, fixed the way the form was handled, and clarified the options presented to the user when prompted.

AttachmentSize
openid_provider_sites_page.patch 10.97 KB

#14

anarcat - March 13, 2009 - 01:09

Tricky one: i forgot that the original behavior was to ask the user, I made sure this was still the case in this (hopefully) last patch.

AttachmentSize
openid_provider_sites_page.patch 10.99 KB

#15

anarcat - March 13, 2009 - 19:30

'sigh... So the patch was making it so that by default, the behaviour was to deny access (since '' = 0 in PHP), so I have fixed the default.

I also included some code to add watchdog entries when allowing access to the openid_provider.

AttachmentSize
openid_provider_sites_page.patch 11.41 KB

#16

opensanta - March 13, 2009 - 19:51
Status:needs review» needs work

I tried #14 and was surprised that it stopped working. #15 works now when testing at http://openidenabled.com/resources/openid-test/checkup

Success Failure Incomplete
Associate (DH-SHA1 session) 1 0 0 Try again?
Successful checkid_setup 1 1 0 Try again?

The new interface also works. The only problem was that I had the setting on Ask, and then at the prompt said always allow, and even though it then always allowed, the interface was still set on Ask.

#17

anarcat - March 14, 2009 - 22:01

So this is weird. I was able to reproduce the issue you mentionned only once: one of my relaying parties was set to 'ask' but wasn't asking. I set it to 'allow', saved the page, set it to 'ask', and saved the page again and then it asked.

All the other RPs didn't behave this way.

This is rather weird, i don't think there's an issue with the code... and now i can't reproduce that issue..

Anyone else can provide a reliable test case for that issue?

#18

Aron Novak - March 19, 2009 - 10:00
Status:needs work» reviewed & tested by the community

I tested the patch and it works reliably.
When you try to test it, do a reinstall to make the schema up-to-date.

#19

anarcat - March 21, 2009 - 18:14

Actually, just running update.php should be enough.

Also, I must say I have witness some /instability/ regarding website approval. I could swear I have repeatedly approved identi.ca to always have access and it's *sometimes* prompting me, I'm not sure I understand why or if this behavior was present before the patch.

#20

Gábor Hojtsy - April 6, 2009 - 11:03
Issue tags:+drupal.org identity

Setting the OpenID module up on drupal.org is a cornerstone of the redesign efforts. So making the server interface usable would be pretty important.

#21

anarcat - May 17, 2009 - 02:36
Status:reviewed & tested by the community» needs work

Actually, I'll reset this to 'needs work' because the issue i confirmed earlier is still there and very annoying. Basically, it's a regression: you always get prompted to accept the consumer even if you choose 'yes, always'.

Very annoying bug, we need to fix this.

#22

Aron Novak - June 11, 2009 - 08:37

I can confirm, i could reliably reproduce openid login issues. I get OpenID login failed messages all the time after applying the patch.

#23

Aron Novak - June 12, 2009 - 12:30
Status:needs work» needs review

I could reproduce the problem described in #21, so I fixed the issue.
The problem was here:

_openid_provider_rp_save($user->uid, $realm, TRUE);
(line 150)
TRUE is not appropiate here, because it can be multiple values. I replaced it to $rp->access and it works fine now.
Also I removed watchdog calls, I assume those messages mostly useful in a debugging environment.

AttachmentSize
396508_openid_provider_sites_page.patch 11.83 KB

#24

ceardach - July 3, 2009 - 05:49
Issue tags:+Usability

Marked http://drupal.org/node/395010 as duplicate.

[snip] ... For example, would it make sense to be able to delete items from here? So that if for example you just test stuff out, it is not gonna litter your list of sites? Or should we just keep to the setting for automated assignments?

I'd like to see the question of whether or not a user can remove an entry addressed again. I looked through the code and didn't see an option for removing entries.

 
 

Drupal is a registered trademark of Dries Buytaert.