In SP2013, I want to hide the top bar for people who have only read permissions on the page. But the problem is, the top bar still shows no matter what. I have this
I have an account that just has read permissions. I remove the top bar by default, but this code is supposed to enable it if you have edit rights. So If I were to remove this code, and visit the page with that account, I actually don't see it. But if I add this code, and visit the page, I see the top bar, when I shouldn't because the account only has read permission. Somehow its getting permission. Does anyone know what's wrong?
Thanks
<!-- show top black bar if you have permission --><!--SPM:<SharePoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControlRibbon1" runat="server" PermissionContext="CurrentItem" PermissionsString="AddAndCustomizePages">--><!--SPM:<SharePoint:CssRegistration Name="<% $SPUrl:~sitecollection/_layouts/15/site_actions.css %>" After="corev15.css" runat="server"/>--><!--SPM:</SharePoint:SPSecurityTrimmedControl>-->