Paul Andrew
Paul Andrew

Reputation: 116

How do I set SharePoint Online list permissions for Add and View only but not Edit?

I have a SharePoint list in SharePoint Online (based on SharePoint Server 2013) and I want to let users add items to the list, but not edit any items. Once they have submitted the item I want it to be reviewed and have other things depend on it, so I can't have the user making changes. I can only see a Contribute permission that I can assign users to and this allows Create, View, and Edit. Anyone know how I can assign permissions to users for just Create and View. Excluding Edit?

Upvotes: 1

Views: 3836

Answers (4)

J.A.G
J.A.G

Reputation: 11

I struggled with this as well. Apparently External users do not, by default, have access to the UseRemoteAPIs permissions. This is demonstrated with trial and error. I had trouble finding any documentation to back it up.

That said, as an administrator on the Office365 SharePoint site, you can turn off the requirement for UseRemoteAPIs permission in order to allow your client-side JavaScript to function as expected on External or Anonymous users.

This blogger has similar issue, and although his context is for the O365 Public SharePoint sites (https://yieldreturnpost.wordpress.com/2014/08/28/anonymous-api-access-for-office-365-public-sites/) the same applies for regular O365 SharePoint sites:

<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(function() {
   var ctx = new SP.ClientContext();
   var site = ctx.get_site();
   site.updateClientObjectModelUseRemoteAPIsPermissionSetting(false);
   ctx.executeQueryAsync(
      function() { alert('success') },
      function() { alert('error') }
   );
}, 'sp.js');
</script>

Note that you only need to make the above call once on the site.

Upvotes: 0

user3570217
user3570217

Reputation: 1

MSFT says you can do this via their siet settings but i followed the directions below and still could not fine the add permission level.

Create a permission level To create a permission level, follow these steps.

On the top-level site of the site collection, click Settings Small Settings gear that took the place of Site Settings., and then click Site Settings. On the Site Settings page, in the Users and Permissions section, click Site Permissions. On the Permissions tab, click Permission Levels. On the Permission Levels page, click Add a Permission Level. On the Add a Permission Level page, in the Name and Description boxes, type a name and description of the permission level. In the Permissions area, select the check boxes next to the list, site, and personal permissions that you want to associate with this permission level. Click Create.

Upvotes: 0

Unnie
Unnie

Reputation: 947

You can create a new custom permission level by copying permissions of "Contribute" and removing Edit from that. Site Settings-> Site Permissions -> Permission Levels -> click on "Contribute"-->Copy Permission Level in the next page uncheck "Edit" and create. Also you can do the same thing programmatically using feature receiver.

SPRoleDefinition roleDefinition = new SPRoleDefinition();
                        roleDefinition.Name = "School user custom permission";
                        roleDefinition.Description = "This Permission level has rights to add and view items.";
                        roleDefinition.BasePermissions = SPBasePermissions.AddListItems | SPBasePermissions.ViewListItems |SPBasePermissions.DeleteListItems|
                            SPBasePermissions.ViewPages | SPBasePermissions.ViewFormPages | SPBasePermissions.OpenItems | SPBasePermissions.ViewVersions | SPBasePermissions.DeleteVersions
                            | SPBasePermissions.CreateAlerts | SPBasePermissions.BrowseDirectories | SPBasePermissions.BrowseUserInfo | SPBasePermissions.UseRemoteAPIs | SPBasePermissions.Open
                            | SPBasePermissions.EditMyUserInfo | SPBasePermissions.ManagePersonalViews | SPBasePermissions.UpdatePersonalWebParts;
                        web.RoleDefinitions.Add(roleDefinition);

Upvotes: 1

Naim Murati
Naim Murati

Reputation: 373

You can create a custom permission level then assign that to users/ groups for your library.

To create a custom permission level go to Site Settings-> Site Permissions -> Permission Levels -> Add a permission level

Upvotes: 1

Related Questions