Ticket #674 (new Bug)
"Add variant" not available without write permissions to current variant
| Reported by: | webmaster@… | Owned by: | somebody |
|---|---|---|---|
| Priority: | Minor | Milestone: | |
| Component: | Frontend (wiki) | Version: | 2.2 |
| Keywords: | Cc: |
Description
[jira2trac import : issue created on November 4, 2008 11:36:34 AM CET http://issues.cocoondev.org/browse/DSY-674 ]
Daisy 2.2 allows the creation of a variant if the user has read permissions to the base document variant. Write permissions for the resulting new variant are tested at write time (eg when user presses "Save" in the Daisy Wiki editor.) This allows for instance the creation of a "French language editor" role, who is able to translate a document from another language into French without being able to change the original document in another language, as is a very welcome addition (at least for our organisation.)
In spite of this, the option "Add variant..." is not shown unless the user has write privileges to the base variant.
In documentlayout.xsl, inside <xsl:template name="availableVariants">, the bit that causes the "Add variant..." option to be added is:
<xsl:if test="$isEditor">
<createVariant href="{concat($documentPath, '/createVariant', $variantQueryString)}"/>
</xsl:if>
</availableVariants>
I suggest changing the test line (line 168) to
<xsl:if test="not($onlyGuestRole)">
This way, the "Add variant..." option will be shown to all logged in users, and write permissions will be checked on write time only.
Attachments
Change History
Changed 3 years ago by paul
- Attachment 10955_DSY-674.patch added
comment:1 Changed 3 years ago by paul
[jira2trac import : comment created by julio.reis on May 13, 2009 2:40:39 PM CEST]
Patch to present "Add variant" option to editors who cannot change the current variant, but may be able to create a different variant. Example: a Dutch translator who can create Dutch documents but not change English ones wasn't allowed to create a Dutch variant from an English variant.
"Add variant" now shown to anyone who's not simply a Guest; other tests are deferred to variant save time.
DSY-674.patch