Permission error pages should instruct users how to get permissions

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
User Interface
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: gerv, Assigned: dkl)

Tracking

Production

Details

Attachments

(1 attachment, 1 obsolete attachment)

It seems that, somewhere along the line, the fix for bug 179944 has got lost.

We should restore it, or something functionally equivalent.

Bug 364858 added a hook to the auth_failure message called "auth_failure"; we should use it to add appropriately-useful text.

Example from bug 179944:

If you are attempting to confirm an unconfirmed bug or edit the fields of a bug, <a
href="http://www.gerv.net/hacking/before-you-mail-gerv.html#bugzilla-permissions">find
out how to get the necessary permissions</a>.

Gerv
(Assignee)

Updated

6 years ago
Assignee: nobody → dkl
Status: NEW → ASSIGNED
(Assignee)

Comment 1

6 years ago
Somehow in the effort to port changes to newer versions of Bugzilla the customization got messed in that it resides in a file called

extensions/BMO/template/en/default/hook/global/user-error.html.tmpl/auth_failure/permissions.html.tmpl

which as you can see is not a valid way to add a hook. Not sure how that happened. One thing I want to ask is if this would be better in the 'illegal_change' template error and not 'auth_failure' in the first place. 'auth_failure' is used mostly for administrative related errors about permissions (editusers.cgi, editproducts.cgi, etc) whereas 'illegal_change' is used in conjunction mostly with check_can_change_field and seems to fit better with the proposed error text. Downside is 'illegal_change' does not currently have a hook and one would need to be added. Don't think it would be an issue to push upstream.

Thoughts?

dkl
We should put it into whichever error is thrown when you try and make a change to a bug that you aren't allowed to make! :-) I assume that's illegal_change? Perhaps we've split an error into two errors since the patch was first written.

Gerv
(Assignee)

Comment 3

6 years ago
Created attachment 640212 [details] [diff] [review]
Patch to append error message when illegal changes are made (v1)

Patch that adds the message about gaining additional permissions when an illegal bug change is made.

I added a new hook called "error_message" to user-error.html.tmpl that allows for appending additional text to an already existing error message. I will try to push this upstream if this an acceptable solution.

dkl
Attachment #640212 - Flags: review?(glob)
that patch looks good, but i don't think the page we're linking to is clear enough about what to do - there's a lot of other content there which isn't related to the error at hand.

any reason why we can't put just the relevant text on a custom page hosted on BMO and link to that instead?
also, i think it would be a good idea to direct people to email bmo-admins@mozilla.org instead of just gerv.
(Assignee)

Comment 6

6 years ago
(In reply to Byron Jones ‹:glob› from comment #4)
> that patch looks good, but i don't think the page we're linking to is clear
> enough about what to do - there's a lot of other content there which isn't
> related to the error at hand.
> 
> any reason why we can't put just the relevant text on a custom page hosted
> on BMO and link to that instead?

Agreed. I admit I did the patch with the original link keeping the status quo for now. But you make a good point that the text should be hosted locally and I even questioned the process in bug 767629 hoping to get it more formalized. Emailing bmo-admins would be a start in that direction.

dkl
Comment on attachment 640212 [details] [diff] [review]
Patch to append error message when illegal changes are made (v1)

as per comments 4 and 5
Attachment #640212 - Flags: review?(glob) → review-
bmo-admins@ seems too wide (way too many admins on that list who don't do anything). Perhaps bugzilla-admin@ instead?
Better, a specific alias for this. Then we can reallocate the job as we like without updating the code. Ideally, we would find a clued-in community member who is not a BMO admin who could be trusted with the role. 

Gerv
(Assignee)

Comment 10

6 years ago
bmo-perms@mozilla.org maybe? Along with the list of people currently attached to this bug, who else should I have added to the alias for the time being? Once we have the list I can talk to IT to get the alias set up with the proper members. Once that is in place I can push out the patch with the new text explaining how to get enhanced permissions.

dkl
I'd say it probably only needs to be one person, although perhaps two would be good with one person blackholing the email until the other person says "BTW, I'm on holiday for the next week". 

I'm happy for it not to be me, if we can find someone who will exercise the appropriate level of discernment.

Gerv
(Assignee)

Comment 12

6 years ago
Any volunteers? Should it be glob and myself for the time being?

dkl
If you are happy to do it, then I trust you :-)

Gerv
...although having said that, you should always be on the lookout to delegate to an appropriately-competent non-employee, on the basis of spreading the responsibility around.

Gerv
(Assignee)

Comment 15

6 years ago
(In reply to Gervase Markham [:gerv] from comment #14)
> ...although having said that, you should always be on the lookout to
> delegate to an appropriately-competent non-employee, on the basis of
> spreading the responsibility around.
> 
> Gerv

Sure.

Created an IT request to create the new email alias. Also I will move your descriptive explanation of how the enhanced permissions are obtained to a BMO page that we will link to instead in the error message.

dkl
Depends on: 773287
(In reply to David Lawrence [:dkl] from comment #12)
> Any volunteers? Should it be glob and myself for the time being?

Include both Gavin and me, please. Gavin does a ton of canconfirm+editbugs additions already, and I do them sporadically as needed.
(Assignee)

Comment 17

6 years ago
Created attachment 641549 [details] [diff] [review]
Patch to append error message when illegal changes are made (v2)
Attachment #640212 - Attachment is obsolete: true
Attachment #641549 - Flags: review?(glob)
Comment on attachment 641549 [details] [diff] [review]
Patch to append error message when illegal changes are made (v2)

r=glob

>+<h3>I would like my permissions upgraded on bugzilla.mozilla.org</h3>

i'm not too sure about this wording, but i can't think of anything better :)
maybe "How to apply for a permissions upgrade"

it's ok to go in as per the patch :)
Attachment #641549 - Flags: review?(glob) → review+
(Assignee)

Comment 19

6 years ago
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0
modified template/en/default/global/user-error.html.tmpl
Committed revision 8247.                                                                                           

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0
added extensions/BMO/template/en/default/hook/bug/comments-end.html.tmpl
added extensions/BMO/template/en/default/hook/global/user-error-error_message.html.tmpl
added extensions/BMO/template/en/default/pages/get_permissions.html.tmpl
Committed revision 8248.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2
modified template/en/default/global/user-error.html.tmpl
added extensions/BMO/template/en/default/hook/bug/comments-end.html.tmpl
added extensions/BMO/template/en/default/hook/global/user-error-error_message.html.tmpl
added extensions/BMO/template/en/default/pages/get_permissions.html.tmpl
Committed revision 8255.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 20

5 years ago
(In reply to Reed Loden [:reed] from comment #16)
> (In reply to David Lawrence [:dkl] from comment #12)
> > Any volunteers? Should it be glob and myself for the time being?
> 
> Include both Gavin and me, please. Gavin does a ton of canconfirm+editbugs
> additions already, and I do them sporadically as needed.

If you want to split this further, I'd be happy to cover hits that occur for users in thunderbird + mailnews core products. And could probably find coconspirator
The fix for bug 179944 "Permissions page should instruct users how to earn permissions" seems indeed to have got lost: https://bugzilla.mozilla.org/userprefs.cgi?tab=permissions has no link telling me how to elevate my permissions. ISTR that it consisted of the following steps:
1) Make sure that you fulfil the requirements for the desired privilege.
2) Email Gerv with proof of (1) in the form of links to the relevant bugs, saying which privilege you'd like to have.
3) Wait for an answer.
I know I found these somewhere but I don't remember where (maybe by following links from Gerv's blog?).

One problem that the present bug doesn't cover is that there are actions which you simply cannot even attempt unless you have the required privilege: for instance, when I had no privileges the "Status" rolldown (or maybe radio, at that time?) simply didn't offer the NEW value. Similarly, IIUC for users without at least EDITBUGS the fields "Product" "Component" "Hardware" "OS" etc. on bugs which they didn't report are just text, not widgets, so they cannot even attempt to change them.
You need to log in before you can comment on or make changes to this bug.