Last modified: 2011-03-13 18:06:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13403, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11403 - Don't show "edit with form" tab if user don't have permissions to edit the page
Don't show "edit with form" tab if user don't have permissions to edit the page
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-19 20:47 UTC by Sergey Chernyshev
Modified: 2011-03-13 18:06 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Disables "Edit with form" tab if user don't have permissions to edit the page (714 bytes, patch)
2007-09-19 21:33 UTC, Sergey Chernyshev
Details

Description Sergey Chernyshev 2007-09-19 20:47:44 UTC
If user can't edit the page, there is no point to show "Edit with form" tab so let's disable it.
Comment 1 Yaron Koren 2007-09-19 21:13:24 UTC
I'm puzzled - is that from the same guy who wrote this? :)

http://groups.google.com/group/semantic-forms/browse_thread/thread/19c49c32e03c4375/e01224d816eeea75?lnk=st&q=&rnum=72#e01224d816eeea75
Comment 2 Sergey Chernyshev 2007-09-19 21:33:14 UTC
Created attachment 4135 [details]
Disables "Edit with form" tab if user don't have permissions to edit the page

This patch is made against 0.5.7 but it seems to be the issue in latest release as well.
Comment 3 Sergey Chernyshev 2007-09-19 21:43:30 UTC
(In reply to comment #1)
> I'm puzzled - is that from the same guy who wrote this? :)

Looks like the same guy ;)

The problem is that even being logged in, user is not necessarily allowed to edit the page (e.g. if user is restricted to only edit their own page or if page is simply protected by admin) - in this case there is no real point for showing the tab and disabled form.

Do you think it makes sense to separate "Logged out" case from "Not allowed" case?
Comment 4 Yaron Koren 2007-09-20 14:49:05 UTC
Well, right now the "edit" tab always appears, even if you can't edit; though it often shows up as "view source" when you can't edit the page. I like the fact that you can always at least see which pages are form-editable, and what the form looks like. What about just renaming the tab to, say, "view form", if you lack the permission to edit for any reason?
Comment 5 Sergey Chernyshev 2007-10-15 22:29:20 UTC
Yeh, renaming it is good, but also, I'd make it optionally removable based on configuration parameter.
Comment 6 Sergey Chernyshev 2007-10-24 00:36:55 UTC
Strange, but my patch is having trouble with some pages

  $target_title = Title::newFromText($target_name);

returns nothing.
Comment 7 Roan Kattouw 2007-10-24 17:00:25 UTC
(In reply to comment #6)
> Strange, but my patch is having trouble with some pages
> 
>   $target_title = Title::newFromText($target_name);
> 
> returns nothing.
> 

It returns either a Title object, or null. In the latter case, $target_name is an invalid title. You can check for this with is_null($target_title)
Comment 8 Sergey Chernyshev 2007-10-24 22:18:09 UTC
Thank you, I'll try to debug - it did freak out on a subpage with parenthesis so maybe there is some sort of title escaping needs to be done.
Comment 9 Yaron Koren 2008-09-19 21:21:56 UTC
I'm changing this to "WONTFIX": the tab now shows up as "view form" if the user can't edit the page - I don't see a need to ever hide the tab completely.
Comment 10 Sergey Chernyshev 2008-09-19 21:47:38 UTC
By default it makes sense to have it like this, but it should be possible to remove tab completely with some configuration parameter - many people build sites where "edit" appears only when it's allowed.

       Sergey
Comment 11 Yaron Koren 2008-09-19 22:57:15 UTC
Dispute resolved, after some private discussion - apparently there's no automatic way to hide the "edit" tab either. Setting back to "won't fix".

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links