Problem:
You need check permissions in the xsl transformation of custom field. But the permissions are not evaluated correctly, because they are compared with site level permissions instead of the list item permission mask.
Solution:
You can use build-in xslt template “IfHasRights”, which is used fe. by “Edit” column and is placed in the file fldtypes.xsl. Or you can create and customize own template according to needed permission level check.
<!-- IfHasRightsAddListItems - 2 --> <xsl:template name="IfHasRightsAddListItems" ddwrt:ghost="always"> <xsl:param name="thisNode" select="."/> <xsl:variable name="mask" select="$thisNode/@PermMask"/> <xsl:variable name="bit" select="substring($mask, string-length($mask))"/> <xsl:choose> <xsl:when test="$bit = '2' or $bit = '3' or $bit = '6' or $bit = '7' or $bit = 'A' or $bit = 'a' or $bit = 'B' or $bit = 'b' or $bit = 'E' or $bit = 'e' or $bit = 'F' or $bit = 'f'">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:template>
… you can change permission mask compare according to table https://vintentou.wordpress.com/2010/06/30/limit-view-from-xslt-according-to-rights/
<xsl:variable name="hasRight"> <xsl:call-template name="IfHasRightsAddListItems"> <xsl:with-param name="thisNode" select ="$thisNode"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$hasRight = '1'"> ... <!-- has AddListItems rights --> <xsl:when> <xsl:otherwise> ... <!-- has not AddListItems rights --> <xsl:otherwise> <xsl:choose>