I am creating a plugin that hides elements on the UI page. I only want to hide the elements when the Identity has the SPRight PluginUser. For normal users this works perfectly, if the user has PluginUser the UI elements are hidden. If the user does not have PluginUser the elements are not hidden.
The problem is when I have a user that has SystemAdministrator capability the snippet always hides the UI elements. This is true for spadmin or any other user that has the SystemAdministrator capability.
I could update the header.js to conditionally execute based on the identity name, but I would rather use SPrights to control things.
<entry key="snippets">
<value>
<List>
<Snippet regexPattern=".*/home.jsf" rightRequired="PluginUser">
<Scripts>
<String>ui/js/snippets/header.js</String>
</Scripts>
<StyleSheets>
<String>ui/css/styles.css</String>
</StyleSheets>
</Snippet>
</List>
</value>
</entry>