0
votes
1answer
46 views

Programmatically adding group to Site Collections

I am trying to create a user group in SharePoint using the following code: // check if group exists SPGroup newGroup = OfferWorkspaceUserGroup.GetGroup(web, name); //create group with no users if ...
0
votes
2answers
95 views

How to get groups and their roles/permissions on each individual subsite, without including groups from child elements (such as libraries)?

Using CSOM and C#, how can I get the groups that have permissions on a site along with their roles, given that I have the name of the subsite? Language might be a barrier here, and I tend to explain ...
0
votes
2answers
122 views

How to programmatically get all groups that have permissions on site?

I found this question and that person was asking how to get all the groups from a site, but instead he already has code that returns groups that have permissions on the site. And that is what I am ...
0
votes
1answer
47 views

Object Model List all users with full control on a sub site in SharePoint 2013?

If I have a sub site URL and a user with Site Admin, can I list all users in that sub site that have Full Control at that level? Any C# code sample?
2
votes
0answers
118 views

Changing the Modified Date of a List Item using the SharePoint Client Object Model (C#) with Contribute Permission

I have a small snippet of code that I use to update the Modified Date of a list item and it works great for users with Full Control permissions. However, for users with just Contribute access to the ...
0
votes
2answers
62 views

Are farm admin privileges required to update SPContentDatabase property bag?

If I store custom data inside SPContentDatabase.Properties, must I be farm admin to be able to update it? E.g. SPContentDatabase contentDatabase = GetContentDatabase(); ...
0
votes
3answers
200 views

List users in SharePoint group running as system

This works as local administrator only, but I'm trying to figure out how I can make it work with NT AUTHORITY\SYSTEM. It starts spitting out group members but fails with access denied on a specific ...
1
vote
1answer
55 views

Add a folder to a document library and break permission inheritence

I have a web part that is being used to manually add folders to document libraries (Part of the requirements is that only administrators can add folders, contributors must only be able to add ...
1
vote
1answer
119 views

Check user read access to a particular list item

I need to check if a user has read level access to a particular list Item. What would be the best approach 1) listItem.DoesUserHavePermissions(currentUser, SPBasePermissions.ViewListItems); //here ...
0
votes
1answer
71 views

Get Items from limited list by providing username and password - C#

I'm using this code in order to get items from SharePoint list. I have a SharePoint list that limited to certain users. How can I provide by this code (or else) a username and password and login as a ...
0
votes
0answers
68 views

sharepoint app user's self-service registration and authentication

I need to develop an application where users register and authenticate to a website in a self-service manner,and the application is a provider hosted application in Sharepoint 2013. Any ideas of how ...
3
votes
1answer
186 views

C# - Why impersonation is expired while ClientContext.ExecuteQuery() is performed

What I’m trying to do is to connect to SharePoint list by other credentials (impersonation) and print its items. I’m using this code for the impersonation, and it works almost perfectly, until ...
0
votes
0answers
97 views

Request for the permission of type 'System.Data.OracleClient.OraclePermission failed

I am facing a permission issue. I am deploying my asp.net application to SharePoint 2010 environment as a WSP solution package. Our application uses Oracle client to contact our Oracle database and ...
3
votes
1answer
500 views

Problem getting web templates and creating subsite in custom code from app only context with tenant fullcontrol permission

I have an autohosted app that has a tenant FullControl permission. I have the following code running out of a remote event receiver that executes when some item in a list is modified. ...
0
votes
1answer
255 views

Error 401 on ExecuteQuery SharePoint 2013 production SharePoint Server

I create a farm solution that query in a list of SharePoint 2013. When I run my solution in a development server using Context.Credentials = new NetworkCredential('user', 'pass', 'domain'), the query ...
0
votes
1answer
2k views

Limit a user group to a specific view created via InfoPath 2010

I have created a new view called 'RequesterView' (via InfoPath 2010) to add items to a issue tracking list. The purpose of this is to limit the visibility of certain fields such as 'Assigned To', 'Due ...
0
votes
1answer
142 views

Setting permissions on a folder

2010, c# server object model I'm trying to programmatically assign permissions to specific folders in a document library (see my original post here) but I'm hung up on selecting a folder as an ...
0
votes
1answer
303 views

Using custom SPRoleType

Environment: SP2010 Enterprise, VS2012, c# Server-Side, full control of environment I'm trying to assign unique permissions to an SPItem (a folder in a document library) through a console app on the ...
1
vote
2answers
467 views

Field level permission development

I am aware that there already are some questions regarding on how to implement field level permissions customization in SharePoint, such as: SP 2010: column permission Permissions for List or ...
2
votes
1answer
1k views

How to check if user has read/write permission for a SPListItem in c#?

In my SP2010 visual webpart, I am checking permissions with the code below. Basically the current user is either an admin or a regular user. If they are an admin, they need to have permission to edit ...
4
votes
3answers
517 views

How to programmatically modify item level permissions prior to first save?

I've got a situation where there are strict permissions requirements on an a list of which I already have written a custom form. The requirement is that upon creation, based on metadata, only certain ...
1
vote
1answer
273 views

How to programmatically access and manipulate Discussion item and replies?

How to access and manipulate Discussion item and replies? I have a discussion board that has a check box, based on the input I switch the permissions of that discussion post for a specific user (from ...
1
vote
1answer
465 views

Is it possible to check if a document has unique permissions using SP2010 Client Object Model

I have a 2010 site that has many documents in many different folders. I believe a number of them have broken permission inheritence. Is there a way i can code a C# console app to utilise client object ...
0
votes
1answer
73 views

How to show what level of permission a group or user has to a site?

In SharePoint 2007 when you go to a site and view advanced permissions (Site Actions - Site Settings - Modify All Site Settings - Advanced Permissions) you are presented with a page that has a table ...
1
vote
1answer
75 views

Content DB not getting any permissions on web application created through central admin

I tried to create a Web Application using Central Admin. It created web app without displaying any error, I can browse site too after creating site collection and that, but content db got no ...
3
votes
2answers
5k views

how to give Role permission to list programmatically?

I have set my web permission to Inherit Permissions as well as Lists.and programmatically i have add SPUSER to web with assigned 'Restricted Read' access Role. and also associate SPUSER to List1 ...
3
votes
1answer
598 views

Show asp.net webpart elements based on user permission level?

I want to do the following: I have a webpart and two users (not in groups, though, because for a reason I don't understand there are no groups in the productive environment here ;) ). One stands ...
1
vote
1answer
62 views

Transfer user permissions

I have a SPListItem for which I need to transfer all directly given permissions from Alice to Bob. It sounds like a common scenario, but still I was not able to find a solution (except third party ...
0
votes
2answers
487 views

The impact of BreakRoleInheritance()

I call BreakRoleInheritance on a document (the actual list item) in order to assign someone of less permissions the 'contribute' rights to that particular item. In doing that, have I 'broke' the ...
1
vote
1answer
524 views

Item-level permissions on document library

I ultimately want to grant users edit permission only on the items they created. According to this article: http://www.hersheytech.com/Blog/SharePoint/tabid/197/entryid/28/Default.aspx I can do ...
0
votes
1answer
124 views

Simple permissions question

I know how to grant someone certain role to a list (contribute or read for example) using C# such as: SPRoleAssignment userRoleAssignmentCont = new SPRoleAssignment(allUsers); ...
0
votes
3answers
362 views

Site Collections <target user> is a member of

There is already a webpart for this but it shows subsites etc, which is not the requirement. What I need is a webpart that will list the Site collections a target user is a member of, and it must be ...
2
votes
2answers
428 views

Uploaded document “modified by” incorrect user

I'm working with a program that uploads to site folders, using C# and WSS3, and I am trying to ensure that it works correctly with Sharepoint permissions. In my test program for the Frontpage RPC ...
0
votes
2answers
4k views

How to add specific SharePoint Group to List permission with c#?

using (SPSite site = (SPSite)properties.Feature.Parent) { using (SPWeb web = site.OpenWeb()) { if (web != null) { web.AllowUnsafeUpdates = true; SPList list = ...
1
vote
1answer
1k views

EventReciever to change permissions

I am trying to create an event reciever on a document library that on creation it removes all permissions and gives the author contribute writes. All other users get nothing. I have the following ...
1
vote
1answer
2k views

“DWORD (32-bit) Value” or “”Qword (32-bit) Value" - which one should I configure in Windows 64-bit registry?

"DisableLoopbackCheck & SharePoint: What every admin and developer should know" advises to disable ("infamous") "loopback check" completely on dev machine by following "You receive error 401.1 ...
0
votes
1answer
871 views

Access denied by “Granular Backup”

When I try to copy a custom list from one of subsites of my weapplication's site collection to another by: Central Administration --> Backup and Restore --> Export a site or list --> Filling ...
0
votes
1answer
153 views

removing then setting custom permissions for a list

I have been looking around for few days, but couldn't really figure out, how I will be able to do this. what I am doing is removing all permissions of a given list using following code, using ...
0
votes
1answer
494 views

Listing all the Users/Group, there Type, UserName, and Permissions

Trying to find a C# script that will list me all the groups of Current Web for sake of webpart that will show users the groups and users having permission to a specific web. I know I can get all the ...
0
votes
3answers
443 views

Access Denied for SPUserCollection.remove()

Works for administrator but not working for a normal user. I even tried it with "SPSecurity.RunWithElevatedPrivileges(delegate() {});" after breaking RoleInheritance, and even tried ...
0
votes
3answers
304 views

Minimum access required for Visual Studio 2010 on Windows Server 2008

Hi we are trying to set up a SharePoint development environment for multiple developers on Windows 2008 server, we do not want to give the developers admin rights to the servers, does anyone know the ...
4
votes
2answers
309 views

Efficiently determine if a List is using item level security

How can you efficiently determine if any of the items in a List don't inherit their security from the List? You could use SPListItem.HasUniqueRoleAssignments but this would require iterating through ...
0
votes
1answer
184 views

Right Management

I'm planing a sharepoint application. One part of the solution should be a list. Each list item should have two persons who are allowed to make changes on it (plus two Administratorgroups). The ...
6
votes
2answers
373 views

HTML in SPGroup.Description

I am trying to add a group (SPGroup) programmatically. Everything works fine except for one thing. I would like the group's description to include a link to it's site. Similiar to the look-and-feel in ...
1
vote
1answer
336 views

How can i get entire role assignments from SP 2010 using the COM interface including the users in the AD groups and not the groups names?

I've been trying to get all the RoleAssignments using the COM interface. the problem is that i get the AD user group names instead of the actual users inside the groups. my code looks something like ...
0
votes
3answers
3k views

Trying to update a SPItem from an asp.net page and get the error “The security validation for this page is invalid”

I am trying to update an SPItem from inside a asp.net page but I am getting the error The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try ...
0
votes
1answer
2k views

Error loading and running event receiver Microsoft.SharePoint.Publishing.Internal.PublishingWebEventReceiver in Microsoft.SharePoint.Publishing

I am seeing the following error in my application log: Error loading and running event receiver Microsoft.SharePoint.Publishing.Internal.PublishingWebEventReceiver in Microsoft.SharePoint.Publishing, ...
2
votes
1answer
368 views

hide site action

Is there a way set the site actions drop down to be audience specific. Meaning that as the Owner of the site I want to be able to see it, but for other users (viewers, members, etc) I dont want them ...
2
votes
1answer
92 views

Link to Taxononomy from subweb quicklaunch

Is it possible to create somehow link from some subweb (link is for example placed in quick launch but it's not necessary to be there) to taxonomy page (central administration). For now, I don't know ...
2
votes
1answer
421 views

Is it possible to grant permission for groups (in SharePoint) to a site programmatically?

I am using the SharePoint Object Model to create new sites programmatically (with a custom web part). It works fine but I am wondering if it is possible to grant permission for groups as well? When I ...