ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
Do not display edit link in annotation page when you don't have permissions (Feature #486)
Description
When looking at the history of wiki pages, it is possible to check/annotate each version of the pages. On the annotation page, the edit link is displayed while it is not when on the wiki page (for instance) if you have not enough permissions to edit that page.
If you don't have enough permissions to edit the wiki page, this link (on the annotation page) should not be visible.
Associated revisions
[#486] More menu items on the wiki annotate view.
History
Updated by Felix Schäfer at 2011-07-08 10:16 pm
I just had a look, the edit link on the annotate page is indeed always shown no matter what. The thing is neither the history nor the diff views have a link to the edit page, the diff page has a link back to the history, but that's all.
In all honesty I'd be tempted to remove the edit link completely instead of showing it selectively, else it should be added everywhere else, along with the rest of the "wiki page" menu (the "watch" link, the lock/unlock, and so on). Would removing the link completely work for you, or do you have need of it on the annotate page?
- Assignee set to Felix Schäfer
- Category set to Permissions
Updated by Tom Rochette at 2011-07-09 12:31 am
I'm only suggesting that the UI behavior should be consistent.
Wiki doesn't display edit link => Annotation shouldn't display edit link
Wiki displays edit link => Annotation should display edit link
See https://github.com/tomzx/chiliproject/commit/3c8a95c69649a74faa120d836e83ed2dbf19b1b9 for an example of a fix.
Updated by Felix Schäfer at 2011-07-11 09:11 am
Tom Rochette wrote:
I'm only suggesting that the UI behavior should be consistent.
Wiki doesn't display edit link => Annotation shouldn't display edit link
Wiki displays edit link => Annotation should display edit link
That's exactly what I'm talking about: no other page than the "show" wiki page has the edit link, so I'd either keep it there only, or add it to all other views too :-)
See https://github.com/tomzx/chiliproject/commit/3c8a95c69649a74faa120d836e83ed2dbf19b1b9 for an example of a fix.
2 things here. Rather unimportant: if you can see the annotate page, you can also see the history page (in fact, other than a full link, the history page is the only way you can get to the annotate page), so the link_to_if_authorized
is probably superfluous. More importantly though, the edit link will show if you have edit permission even if the page is locked, which it shouldn't.
Updated by Felix Schäfer at 2011-07-11 09:14 am
Felix Schäfer wrote:
Tom Rochette wrote:
I'm only suggesting that the UI behavior should be consistent.
Wiki doesn't display edit link => Annotation shouldn't display edit link
Wiki displays edit link => Annotation should display edit linkThat's exactly what I'm talking about: no other page than the "show" wiki page has the edit link, so I'd either keep it there only, or add it to all other views too :-)
And now that I've thought a little about it: the edit link on the annotate page makes sense at best on the annotate view of the most recent version, as it is the one you will be editing, not for older views. That's probably why it isn't shown on the wiki page when you browse the history either.
I'll see what can be done to make that a little better, I'd completely remove the edit link on the annotate page until then though.
Updated by Felix Schäfer at 2011-12-18 08:23 pm
I've adapted the menu from the wiki#show actions, which is used for the history view too, to the annotate action. Committed in 1ebec83.
- Target version set to 2.6.0
- Category changed from Permissions to User interface
- Status changed from Open to Closed