X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f35f7358e0d86e20031e74ab25f61ae03352fdc6..365e11783b741e459f4c1cb3595def5211442c2e:/doc/forum/Can_OpenID_users_be_adminusers__63__.mdwn diff --git a/doc/forum/Can_OpenID_users_be_adminusers__63__.mdwn b/doc/forum/Can_OpenID_users_be_adminusers__63__.mdwn index 83c95d65d..17c60c423 100644 --- a/doc/forum/Can_OpenID_users_be_adminusers__63__.mdwn +++ b/doc/forum/Can_OpenID_users_be_adminusers__63__.mdwn @@ -28,8 +28,42 @@ Adam. > The only caveat I know of to make it work is that the > adminuser openid url has to exactly match the openid url that > ikiwiki sees when you log in. Including any trailing slash, -> and the `http://`. -> -> Hmm, it's possible that the new version of the openid library -> has broken it. I also no longer show up as admin. There's a related -> bug [[bugs/openid_no_longer_pretty-prints_OpenIDs]]. --[[Joey]] +> and the `http://`. --[[Joey]] + +>> Hrm, it's not working. I'm sure I've made a silly mistake somewhere but +>> I've looked and looked and just can't find it. Any suggestions on where +>> to look for debugging information would be much appreciated. -- [[Adam]] + +>>> Well, you could use this patch to add debugging info about admin +>>> username comparisons: + +
+diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm
+index 0bf100a..77b467a 100644
+--- a/IkiWiki/UserInfo.pm
++++ b/IkiWiki/UserInfo.pm
+@@ -71,6 +71,8 @@ sub userinfo_setall ($$) {
+ sub is_admin ($) {
+ 	my $user_name=shift;
+ 
++	print STDERR "is_admin test @{$config{adminuser}} vs $user_name: ".(grep { $_ eq $user_name } @{$config{adminuser}})."\n";
++
+ 	return grep { $_ eq $user_name } @{$config{adminuser}};
+ }
+ 
+
+ +>>>> After applying that change to what is probably +>>>> `/usr/share/perl5/IkiWiki/UserInfo.pm` on your system, +>>>> when you go to the preferences page it should log in your web server's +>>>> error.log, something like this: + + [Wed Jul 08 12:54:35 2009] [error] [client 127.0.1.1] is_admin test http://joey.kitenet.net/ vs http://joey.kitenet.net/: 1 + +>>>> So you can see if the two usernames/openids match. If the end is "0", +>>>> they don't match. If nothing is logged, you have not enabled the websetup plugin. +>>>> If the end if "1" you should see the "Setup" button, if not the +>>>> problem is not in determining if you're an admin, but elsewhere.. +>>>> --[[Joey]] + +I was being incredibly stupid and missed that websetup is a **plugin** and thus needed to be enabled. Many thanks for your patient assistance, by helping me eliminate the unlikely it eventually led me to the obvious. Cheers. -- [[Adam]]