[Bug 26703] quickUserCan() vs. createtalk vs. edit

2011-01-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26703

--- Comment #6 from jida...@jidanni.org 2011-01-14 02:30:00 UTC ---
(In reply to comment #5)
 thats not the correct check. but thats off topic.
There is no better way for that hook.

 Furthermore, that manual page is for people running mediawiki installs, not
 people writing php code,

Does it carry such a warning? Even if it did, isn't that a rather dangerous
assumption?

 what are you requesting be changed/be done? This bug lacks a problem 
 statement.

I was hoping you would somehow make the manual page safe to read for
people writing php code too.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 26703] quickUserCan() vs. createtalk vs. edit

2011-01-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26703

Chad H. innocentkil...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||innocentkil...@gmail.com
 Resolution||INVALID

--- Comment #7 from Chad H. innocentkil...@gmail.com 2011-01-14 02:37:39 UTC 
---
quickUserCan( $permission ) returns boolean based on what permission is checked
for. Permissions are not cascading, so quickUserCan( 'createtalk' ) does NOT
imply 'createtalk'  'edit'.

If someone is making use of quickUserCan() in their code, they should
understand the permission model of MediaWiki, which is outlined here:
http://www.mediawiki.org/wiki/Manual:User_rights

In order to create a new talkpage, both the 'edit' and 'createtalk' rights are
required. Sometimes you need more than one right to do an action.

I see no bug in MediaWiki.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 26703] quickUserCan() vs. createtalk vs. edit

2011-01-12 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26703

Bawolff bawolff...@gmail.com changed:

   What|Removed |Added

 CC||bawolff...@gmail.com

--- Comment #1 from Bawolff bawolff...@gmail.com 2011-01-13 03:02:41 UTC ---
Can you be specific what the issue is? I reverted you on the manual because I
checked and you need both createpage and edit to create a page.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 26703] quickUserCan() vs. createtalk vs. edit

2011-01-12 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26703

--- Comment #2 from jida...@jidanni.org 2011-01-13 03:08:36 UTC ---
Yes, but following your manual page, my
if(!$sktemplate-mTitle-quickUserCan('createtalk') in
http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/51493
gave me the wrong answer.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 26703] quickUserCan() vs. createtalk vs. edit

2011-01-12 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26703

--- Comment #3 from Bawolff bawolff...@gmail.com 2011-01-13 03:17:28 UTC ---
While first of all you should be using quickUserCan('create') not
quickUserCan('createtalk'). (The permission is called createtalk, but you're
checking if the user can create not that they can createtalk)

Secondly, it is expected you check both edit and create, not just create.
neither userCan( 'create' ) nor quickUserCan( 'create' ) check if you can edit,
only if you can create the page. Arguably thats a little counter-intuitive, but
thats the way it currently is.

For reference to anyone else reading this, the relevant edit that i reverted
was
http://www.mediawiki.org/w/index.php?title=Manual:Preventing_accessdiff=prevoldid=375514

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 26703] quickUserCan() vs. createtalk vs. edit

2011-01-12 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26703

--- Comment #4 from jida...@jidanni.org 2011-01-13 03:42:55 UTC ---
(In reply to comment #3)
 While first of all you should be using quickUserCan('create') not
 quickUserCan('createtalk'). (The permission is called createtalk, but you're
 checking if the user can create not that they can createtalk)
No, I'm only interested in the talk pages, as you see further down:
if(!$sktemplate-mTitle-quickUserCan('createtalk')){
  foreach(array_keys($links['namespaces']) as $ns){
if(strpos($ns,'talk')!==false){
On the manual page you say
 Note: Revoking the 'edit' right already prevents affected users from creating 
 new pages and talk pages.
(which doesn't tell the user the exact code you mean too, by the way.)
However quickUserCan('createtalk') says otherwise.
 Secondly, it is expected...
One cannot know what is expected. One only reads the manual page.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 26703] quickUserCan() vs. createtalk vs. edit

2011-01-12 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26703

--- Comment #5 from Bawolff bawolff...@gmail.com 2011-01-13 04:03:37 UTC ---
if(strpos($ns,'talk')!==false){
Considering that  a non-talk namespace is allowed to have talk in its name, and
a talk namespace might not have talk in its name (Especially for non-english
namespace names), thats not the correct check. but thats off topic.

No, I'm only interested in the talk pages, as you see further down
yes i knew that. I suppose you could use createtalk instead of create and a
check that the title is a talk page, but everything in core seems to do
userCan( 'create' ).

On the manual page you say
 Note: Revoking the 'edit' right already prevents affected users from 
 creating new pages and talk pages.

While i didn't say that, someone else did, but the sentence is correct.

However quickUserCan('createtalk') says otherwise.

like its supposed to. The sentence never said quickUserCheck('createtalk') will
return false if user doesn't have edit rights. It said you can't create a talk
page if you don't have edit rights. There is a very large difference.
(Furthermore, that manual page is for people running mediawiki installs, not
people writing php code, so talking about internals on that specific manual
page would be inappropriate).
-

Last of all, what are you requesting be changed/be done? This bug lacks a
problem statement.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l