Monday, July 13, 2009

Updating SPGroup owner

Hi

To update the owner of the group, you simply set the Owner property of the SPGroup object to a SPMember (which can be a SPUser or an SPGroup).

SPGroup spGroup = currentWeb.SiteGroups["GroupName"];
spGroup1.Owner = spGroup2;
sp.Group1.Update();

I was trying to update the owner of the SharePoint group through the API using the code above, but unfortunately that did not work.

So i did what most of the developers do, google it (i mean bing it). However i didn't find an answer to my question, so i tried to change my code and debug it until i found the solution.

For some reason, i had to get the reference to the SharePoint group from the root web of the site collection, rather than getting it from the web SiteGroups property.

so to fix the problem, i changed the above code to:
SPGroup spGroup = currentWeb.Site.RootWeb.SiteGroups["GroupName"];
spGroup1.Owner = spGroup2;
sp.Group1.Update();

I hope you will find this useful.




Tuesday, July 7, 2009

University of Auckland - Virtual Medical Centre

Machinima Podcast by the ARCH Network: http://www.archvirtual.com

Second Life Tour led project :
Scott Diener, Ph.D.
Associate Director, IT Services
Academic and Collaborative Technologies
The University of Auckland


Anonymous access in SharePoint

Anonymous access in SharePoint can be configured on the lists level. This means that anonymous access can be setup to individual lists rather than an entire SharePoint site. It can be also turned on for an entire web site.

The anonymous access is enabled from the web application level first. ISA server (if available) will be also configured.

After a web application has been setup for anonymous access, individual web sites can be configured to enable anonymous access on them. By default, sites have their anonymous access turned off, and must be enabled by a site admin before non-authenticated users can access it. As mentioned earlier, this can also be set on individual lists and will be accessible by a direct link to the list.

MySite and Application pages
Unfortunately, with MOSS 2007, MySites cannot be accessible by anonymous users, and that’s because of the way that has been setup. To make them accessible to the outside users, some workarounds are needed. However, sub sites within MySite can be made accessible to outside users, but not the root MySite.

The Application pages (pages in the _Layouts folder) are also not accessible to the outside users. This includes the search default page. It is possible to solve these problems with some workarounds that involves custom developments.