Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SPSecurity trimmed control not working

$
0
0

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="&#60;% $SPUrl:~sitecollection/_layouts/15/site_actions.css %&#62;" After="corev15.css" runat="server"/>--><!--SPM:</SharePoint:SPSecurityTrimmedControl>-->




Viewing all articles
Browse latest Browse all 7589

Trending Articles