Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Prevent SP2010 list from adding new Items and Editing existing items.

Posted on 2010-09-03
4
Medium Priority
?
576 Views
Last Modified: 2012-05-10
Hi,
can anyone please tell me if there is a way to prevent SharePoint 2010 list from adding new Items and Editing existing items through program (probably in Schema file of list).
thanks
0
Comment
Question by:aqibsp82
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:Pstry
ID: 33595109
I think that the simplest solution is to change list security. Just remove contributor permissions (or change them to read).

The second possibility is:

- go to the advanced list settings
- in "Item-level Permissions" section select "None" in "Create and Edit access".

The latter solution does not work in document library.

 

Item-Level-Permissions.png
0
 

Author Comment

by:aqibsp82
ID: 33595481
Thanks Pstry! but i want to do it programacally....
any idea??
0
 
LVL 4

Accepted Solution

by:
Pstry earned 500 total points
ID: 33595508
In C#:

SPList list;

// list = .... // load your existing list
list.WriteSecurity = 4; // 1="All items", 2="Own items", 4 = "None"
list.Update();

if you want to create list from schema - edit Elements.xml, as in the following example (full template omitted for brevity). Note "4" in "SecurityBits":

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <ListTemplate
      .....
      SecurityBits="14"
      ....
    />
</Elements>
0
 

Author Comment

by:aqibsp82
ID: 33595793
thanks Pstry,
that helped :)
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question