Tag Info

Hot answers tagged

7

Yup, you've found another SharePoint-ism. You'll need to the add the group like you're doing and then update the item in the SiteUserInfoList. We use the following static method: public static void UpdateGroupDescription(SPWeb spWeb, SPGroup group, string descriptionString) { SPListItem item = spWeb.SiteUserInfoList.GetItemById(group.ID); ...


4

You can use AD security groups for setting permissions on Sharepoint sites, lists and items. Some additional recommendations can be found at http://technet.microsoft.com/en-us/library/cc261972.aspx It is possible with some simple permissions planning. You can create Sharepoint group HelpDesk and then set this group to have admin permissions on every site. ...


4

You can't count on that number, as it's just the index within the collection. The AssociatedMemberGroup and AssociatedOwnerGroup properties on SPWeb should give you what you're looking for without having to know the actual name of the group.


4

Prints out all the groups for the SPWeb and the group's role names: using (SPSite site = new SPSite("http://server/sites/sitecollection/")) { using (SPWeb web = site.OpenWeb("test")) { foreach (SPRoleAssignment roleAssignment in web.RoleAssignments) { if (roleAssignment.Member is SPGroup) { ...


4

yes it is, look at this Post or this Video showing how to create contact list for sharepoint 2010 EDIT Just got what you wanted to do If the idea is to just use that list as a web part, then i suggest you to look at Site Users web part and add the web part to the landing page, this web part allows you to configure the SharePoint groups that you ...


4

This script should do the trick after few adjustments as its adding new permissions to group which you don't want so you can skip them, function Add-SPPermissionToListGroup { param ($Url, $ListName, $GroupName, $PermissionLevel) $web = Get-SPWeb -Identity $Url $list = $web.Lists.TryGetList($ListName) if ($list -ne $null) { if ...


4

Internally, all users resides inside a special list known as "user information list" at the root site (/) of any SharePoint site collection. This list can be accessed through http://yoursitecollection/_catalogs/users/simple.aspx Groups are virtual collections of users against this list maintained inside the SharePoint Content Database and have different ...


3

A few guidelines/best practices: Apply security at the highest level possible; so first set permissions at the site collection level or even the farm. Then set permissions on the site, then, if necessary, set unique permissions on objects (pages, lists, etc.). SharePoint security works much like Windows folder security: Children inherit from parents unless ...


3

In general, security groups are used for permissions, but distributions are not. You can overcome this by mail-enabling security groups. In this manner, they can be used both for permissions and audiences. PLUS for an Exchange admin, you don't have the hassle of dealing with multiple groups with the same members for the two purposes.


3

To clarify SharePoint's permission behaviour: Sites collections contain the people (users, AD groups) and groups (SharePoint groups) that are available for all sites within the site collection. The idea is a site collection contains sites that have some overlap in user membership or business function. They are a collection of like-minded sites (in some ...


3

The LCID number is wrong (the fourth parameter), it should be one of this list instead than 123: http://msdn.microsoft.com/es-es/goglobal/bb964664.aspx The US-English is 1033. Remember also that if you try to create sites with a non administrator user you should use RunWithElevatedPrivileges method.


3

You need SPWeb.SiteGroups (MSDN link) which includes all groups that exist in the site collection. For further details, please refer to: http://blog.tylerholmes.com/2007/09/spwebgroups-vs-spwebsitegroups.html


3

I just did something very similar to this, should be plenty of pointers. Code below. You are welcome. My code is running as a timer job and synchronizes user groups across several site collection sharing a managed path in a web application. The code uses the following variables: _webApplicationToSynch is the absolute url to the web application. ...


3

You are most likely receiving this error because the group membership can only be modified by the group owner. If you open the Group settings page - you will see a setting that governs who can edit the group membership. There are two options; Group owner and Group members. In the object model it is governed by the Boolean property ...


3

You can use SPContext within a "RunWithElevatedPrivileges" block, but objects you get from "SPContext" such as: SPUser, SPWeb, etc. are not running in elevated privilege, they just take the current user security context. So why not just use "scweb" to get to the "Group". Since "scweb" object is initialized within the "RunWithElevatedPrivileges" block just ...


3

If you want to assign permissions to particular pages (think hard about this if you are going to have a lot of pages as you can run into performance issues) you need to break the permission inheritance on the page library, remove all the permissions in the library except for the Full Control/Owners group, then add your pages with your desired permissions. ...


2

One 3rd party tool (no connection) that will do this is Roxority FilterZen. They have a free 'lite' version. http://roxority.com/sharepoint-zen/sharepoint-list-filtering-by-user-group-membership.html


2

Were any other changes made outside of SharePoint? I know Exchange has an option to set distribution groups to only be available for use by "authenticated or trusted senders" (this prevents email/spam from the internet from being sent to internal distro groups). We ran into this problem, because SharePoint does not "authenticate" to the Exchange server, it ...


2

It sounds very much like you are locking horns with someone 'cleaning up' security on their subsite without an understanding of how People and Groups work in SharePoint. Enable your auditing and security logs and then look through them when these people disappear from their groups. That should tell you exactly who is removing them.


2

In both cases nothing will happen because there is nothing to do on SPGroup.Update(). If you are trying to add user that already exist - it's already there and if you are trying to remove user who is not member of group - there is nothing to remove. Your code will continue as normal and no exception will be thrown. I personally find this 'malfunction' to ...


2

I would try not calling site.RootWeb repeatedly like that. Sometimes in the SharePoint API calling a property like that (e.g. SPList.DefaultView ) actually returns a different object each time. Thus, your call to update is on a different object to the one you updated. I do wonder if that is happening here. Instead, use a variable and pass that around: ...


2

AD groups are definitely not case sensitive inside WSS 3 - This issue is definitely being caused by something else. If you are using Kerberos, you might want to check the upper limit on the Kerberos ticket size - if users are members of more than 100 groups (as a VERY rough estimate), you are likely to start hitting this issue.


2

Assuming SP2010 here... As far as I know no one other than a Site Collection Admin can delete a SP Group. I know it says the Group Owner can delete the group in the UI when you create a group, but I think that's either a mis-print or the assumption is the Group Owner will be a Site Collection Owner. If you look at the privileges associated with Full ...


2

You can't/shouldn't use SPContext when elevating privileges, as the objects represented within it were created under a different (...in this case probably one with less privileges) security context. Try something like this: SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new ...


2

If you aren't going to use the groups, I can't think of a reason deleting them would be a problem EXCEPT that recreating any one of them can be a real pain. Each group is built up of a combination of settings for the 32 permissions. You might be better off leaving them just in case unless the EXCEPT above doesn't concern you.


2

You get the following security options when creating a group in SharePoint: Who can view the membership of the group? Group Member Everyone Who can edit the membership of the group? Group Owner Group Members To me, it doesn't sound like these options would fit your requirements. I'd say you need some custom coding. This is how I would implement ...


2

[EDIT] I didn't spot that you were looking for an "official" answer - if you want that I suggest posing the question to Microsoft. One would hope this gets fixed in vNext. AFAIK this is expected behaviour. Obviously this is inadequate as (like you say) it effectively defeats the purpose of the Web part. This has been discussed on numerous forums but the ...


2

It seems that it is a known issue, and a patch was released: http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/b30a9bc6-71ad-4558-a0ab-6c621c2e3330/ If you're looking for a workaround, instead of grouping you could use connected Web Parts and filtering.


2

Allow invitations into specific groups: Instead of just being able to invite users to the Visitors or Members groups, is there any way I can specify other groups already setup? I've worked this one out: If you go into Site Actions > Site Settings > People and Groups and click the group you would like to invite people into, you can then click Settings > ...


2

Chances are there are some elements on the page or master page which the user cannot access. Check the permissions for the group, what other permissions does the group have? Is your list using a lookup into another list (which that user would need read permission to as well). You can also try running Fiddler to view the traffic requests when logged in as ...



Only top voted, non community-wiki answers of a minimum length are eligible