SPBasePermissions Usage With (Programmatic) and Without Code
In this post, I list some of the properties and methods that return a SPBasePermissions enum , and some methods that take SPBasePermissions as a parameter when checking if a user has certain rights on an object in SharePoint. Later in the post I also explain how the permission masks with SPBasePermissions can be used to customise (show / hide ) content and custom UI actions / links without using code. Programmatic uses of SPBasePermissions to check for or set permissions on various objects in SharePoint The following are some of the more common components in SharePoint that can be used to get or set permissions, or check if certain permissions are effective for a user on the object. Get or set the Base Permissions for a Role Definition in a Web SPWeb.RoleDefinitions.BasePermissions Get the current or specified user’s effective SPBasePermissions on an object (SPWeb, SPList, SPListItem, etc.) Username passed as String to GetUserEffectivePermissions(): SPSite SPSi...