How to grant permissions using claims based identity?
You could grant permissions either to a User or a Group and in order to do that all you needed was a reference to that User/Group. As you might have heard SharePoint 2010 supports claims based identity what allows you to grant permissions using the identity of the user rather than a specific way of authentication.
How to grant permissions to claims in SharePoint 2010?
Programmatically granting permissions to claims in SharePoint 2010 isn’t as complex as it may seem on the first glance. The most important part is correctly retrieving the claim to which you want to grant permissions. The rest is very similar to granting permissions to User or Groups in SharePoint 2007.
Why do we need claims based authentication in SharePoint?
Claims-based authentication is a requirement for web applications that are deployed in scenarios that support server-to-server authentication and app authentication.
How to grant read permission to executive claims?
The following code snippet grants the Read permission to the Executive claim from the CRMClaimProvider: The first thing it does is to retrieve a reference to the object on which we will be setting permissions. In the above code snippet we will be setting permissions on the Root Web of the Team Site located at http://sharepoint * * (lines 1-3).
How to grant read permission to a claim?
You can download the sample code from http://msdn.microsoft.com/en-us/library/ff604688.aspx. The following code snippet grants the Read permission to the Executive claim from the CRMClaimProvider: The first thing it does is to retrieve a reference to the object on which we will be setting permissions.
How to use claim based authorization in ASP.NET?
Implement an admin UI where users can manage Roles and Permissions in the system As in Role based authorization, if the permissions are hard coded based on roles, it will be challenging if there are any changes related to permissions.