SPSecurityTrimmedControl or "How to hide stuff from people"

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:
EmptyMask,ViewListItems,AddListItems,EditListItems,DeleteListItems,ApproveItems,OpenItems,ViewVersions,
DeleteVersions,CancelCheckout,ManagePersonalViews,ManageLists,ViewFormPages,Open,ViewPages,
AddAndCustomizePages, ApplyThemeAndBorder,ApplyStyleSheets,ViewUsageData,CreateSSCSite,
ManageSubwebs,CreateGroups, ManagePermissions,BrowseDirectories,BrowseUserInfo,AddDelPrivateWebParts,
UpdatePersonalWebParts,ManageWeb, UseClientIntegration,UseRemoteAPIs,ManageAlerts,CreateAlerts,
EditMyUserInfo,EnumeratePermissions,FullMask)
  • AuthenticationRestrictions - allows to differ between authenticated and anonymous users
(possible values: AllUsers, AuthenticatedUsersOnly, AnonymousUsersOnly)
save, check-in, publish and there you go!

Ref link : https://www.infowisesolutions.com/blog/Comments.aspx?ArticleId=28

Comments

Popular posts from this blog

How to remove app from SharePoint 2013/2016

The model backing the context has changed since the database was created. Consider using Code First Migrations to update the database