Hello,
I want to disable source view in editlive control based on roles. Here’s what I did
Under /rx_resources/ephox/
I created elj_config_full.xml with
<sourceEditor enabled="true" showBodyOnly="true"/>
and the default elj_config.xml with
<sourceEditor enabled="false" showBodyOnly="true"/>
Then I modified the rx_template.xsl to include the definition for sys_Editlive control, and modified the variable as follows
<xsl:variable name="config_src_url">
<xsl:choose>
<xsl:when test="/ContentEditor/UserStatus/Roles/Role='Admin'">
<xsl:value-of select="'../rx_resources/ephox/elj_config_full.xml'"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="ParamList/Param[@name='config_src_url']">
<xsl:value-of select="ParamList/Param[@name='config_src_url']"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="document('')/*/psxctl:ControlMeta[@name='sys_EditLive']/psxctl:ParamList/psxctl:Param[@name='config_src_url']/psxctl:DefaultValue"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
This should allow only the Admin users to view the sourceview but I think it is not picking up the elj_config_full.xml. The codeview tab is disabled for all the users.
What am I doing wrong here?
Thanks
Pallavi