Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Posts Tagged ‘permission’

REST API to check User Permission

Posted by Paul on October 17, 2015

In this article we can explore the REST API to check User Permission for a Group.

Scenario

You are working in a client-side script SharePoint App. You need to check whether the current user belongs to the Approvers group. The twist is that the current user is added to an AD Group and in turn the AD Group was added to SharePoint group.

Solution: Following is the REST code to get the result.

http://sharepoint/_api/web/sitegroups/getbyname(‘Approvers’)/CanCurrentUserViewMembership

Following is the result.

image

image

You can try REST code in browser address bar itself. Later you can wrap a JavaScript or AngularJS around it to attain programmatic checking.

If I enter an invalid group name, the result will be different.

http://sharepoint/_api/web/sitegroups/getbyname(‘InvalidGroup’)/CanCurrentUserViewMembership

image

We can also check Site Collection & Sub Site permission groups using the same way.

Pre-Conditions

The above code is checking does the user have View Membership permission. In order to make this work we need to configure the following group property as true.

By default this property will be true.

image
You can find more property information using References link.

image

References

https://msdn.microsoft.com/en-us/library/office/jj245943.aspx

Summary

In this article we have explored the REST API to check User Permission for a Group.

Advertisements

Posted in SharePoint, SharePoint 2013 | Tagged: , , , , | Leave a Comment »

App User Permissions

Posted by Paul on April 24, 2015

In this post we can explore how to configure App User Permissions.

image

App User should not be System Account.  If you have not created an App User, you can follow the post below to create one.

http://www.jeanpaulva.com/index.php/2015/04/20/create-app-user/

Farm Administrator Permission

Login as Administrator to the machine. Open Central Administration > Farm Administrators.

image

Add App User to the group.

image

Site Collection Administrator Permission

Login as Administrator to the SharePoint site. Open Site Settings > Site Permissions.

image

Add the App User to the group.

image

Click Ok to save changes.

Database Owner Permission

Login as Administrator to the machine. Open SQL Server Management Studio. Create a new Login for App User.

image

Once the user is created, open the user properties > User Mapping section and assign db_owner permission on all SharePoint databases. You need to select each database and check the db_owner property. Once you checked for all the databases Click the Ok button to save changes.

image

 

Summary

In this post we have explored how to configure App User Permissions.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

View Permission Levels

Posted by Paul on February 24, 2015

In this article we can view the existing permission levels in SharePoint 2013.

Permission Levels

Permission Levels or Role Definitions are name associated with Permission Rights. Permission Rights are pre-defined items which are not customizable.

View Permission Levels

To view the permission levels for your site collection, please follow the following steps.

Open Gear Icon > Site Settings page

image

Click on the Site Permissions link. You will get the following page.

image  

Click on the Permission Levels button from the ribbon. Following would be the Permission Levels.

image

The items on the left are Permission Levels. You can click on the hyperlinks to view/edit them. For example, the Full Control permission levels page is shown below.image

The Permission items are shown as Manage lists, Override List Behaviors etc.
image

Full Control & Limited Access permission levels are not customizable.

References

http://bit.ly/1ArN3xq

Summary

In this article we have explored viewing permission levels. In the upcoming article we an check how to create a custom permission level.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

Role Definitions and Permission Levels

Posted by Paul on February 23, 2015

In this article we can explore Role Definitions and Permission Levels in SharePoint 2013.

Both Role Definitions and Permission Levels are same. The role definition is a name to a set of permission rights. For example the role definition Contribute has the following rights:

· Add Items

· Edit Items

· Delete Items

· Delete Versions

· Browse Directories

· Edit Personal User Information

· Manage Personal Views

· Add/Remove Personal Web Parts

· Update Personal Web Parts

image

Permission Rights are associated with specific operations. We cannot create custom Permission Rights.

image

Role Definitions or Permission Levels

Following are the Out-of-the-box Role Definitions or Permission Levels.

1. Full Control

2. Design

3. Edit

4. Contribute

5. Read

6. Limited Access

7. Approve

8. Manage Hierarchy

9. Restricted Read

10. View Only

Except the Full Control and Limited Access permission level, all others are customizable.

image

We can create custom Permission Level in SharePoint.

References

https://msdn.microsoft.com/en-us/library/ms414036(v=office.12).aspx

https://technet.microsoft.com/en-us/library/cc721640.aspx

Summary

In this article we have explored Role Definitions or Permission Levels.

Posted in SharePoint, SharePoint 2013 | Tagged: , | Leave a Comment »