bug 2913 : Sort of fixed. At least, I've fixed the wrong bit - the button on the form is now no longer there, but the link still reads 'edit'. However, this is a whole lot better.

This commit is contained in:
sb 2009-05-06 18:02:35 +00:00
parent 97e9b62ace
commit 2bd5c55412
2 changed files with 54 additions and 10 deletions

View file

@ -15,8 +15,8 @@
Utility templates to find permissions on various things
$Author: sb $
$Revision: 1.4 $
$Date: 2009-04-30 08:56:33 $
$Revision: 1.5 $
$Date: 2009-05-06 18:02:35 $
-->
<!-- collect all groups which can edit the specified property -->
@ -166,6 +166,32 @@
</xsl:for-each>
</xsl:template>
<!-- collect the groups which can save an entity -->
<xsl:template name="entity-update-groups">
<xsl:param name="entity"/>
<xsl:for-each select="//adl:group">
<xsl:variable name="groupname" select="@name"/>
<xsl:variable name="perm">
<xsl:choose>
<xsl:when test="$entity/adl:permission[@group=$groupname]">
<xsl:value-of select="$entity/adl:permission[@group=$groupname]/@permission"/>
</xsl:when>
<xsl:otherwise>none</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$perm='all'">
<xsl:copy-of select="."/>
</xsl:when>
<xsl:when test="$perm='edit'">
<xsl:copy-of select="."/>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<!-- collect the groups which can delete an entity -->
<xsl:template name="entity-delete-groups">
<xsl:param name="entity"/>