3

I want to prevent users from accessing a list, but to allow them to use web part programmed in C# to add items to the list.

I tried impersonation and RunWithElevatedPriviliges but these are available in farm solutions only. I believe there is a way to solve this without using full trust proxy?

  • Only with a Workflow doing the Elevated permission. If a user has right to create an Item, he/she has rights to create an Item <period> – Danny '365CSI' Engelman Feb 20 '17 at 14:13
0

Not sure if this can be applied to your scenario, but it may help.

$spweb=Get-SPWeb -Identity "<site url>";
$spRoleDefinition = New-Object Microsoft.SharePoint.SPRoleDefinition;
$spRoleDefinition.Name = "Submit only";
$spRoleDefinition.Description = "Can submit/add forms/files/items into library or list but cannot view/edit them.";
$spRoleDefinition.BasePermissions = "AddListItems, ViewPages, ViewFormPages, Open";
$spweb.RoleDefinitions.Add($spRoleDefinition);
$spweb.Dispose();

From,

Add Only Permission Level in SharePoint 2010

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.