martes, 24 de enero de 2012

Control SPSecurityTrimmedControl

Este control permite ocultar el contenido debido a una determinada definición de seguridad.  La solución anterior ocultaba en el lado del cliente (style.display='none') el contenido, ahora lo hace desde el servidor.

<SharePoint:SPSecurityTrimmedControl PermissionsString="AddAndCustomizePages, ManageLists" runat="server">
    <%--content %>


Oculto la ribbon:

Useful attributes of the control:

  • PermissionContext - against which user permissions will be tested

(possible values: CurrentSite, CurrentList, CurrentFolder, CurrentItem or RootSite)

  • PemissionMode - does the user have to meet all role definitions or just one of them

(possible values: All or Any)

  • PermissionsString - what permissions does the user need to see the content - can enter some values separated by comma

(possible values are from the enumeration SPBasePermissions:



AddAndCustomizePages, ApplyThemeAndBorder,ApplyStyleSheets,ViewUsageData,CreateSSCSite,

ManageSubwebs,CreateGroups, ManagePermissions,BrowseDirectories,BrowseUserInfo,AddDelPrivateWebParts,

UpdatePersonalWebParts,ManageWeb, UseClientIntegration,UseRemoteAPIs,ManageAlerts,CreateAlerts,


  • AuthenticationRestrictions - allows to differ between authenticated and anonymous users

(possible values: AllUsers, AuthenticatedUsersOnly, AnonymousUsersOnly)

save, check-in, publish and there you go!



Más información:

SharePoint Anonymouse Access Web Part Targeting

No hay comentarios:

Publicar un comentario