Update site members group when list item added
I'm trying to automate site creation. In a nutshell a user fills out a form and, once approved, this info will be used to create a new site based on one of our templates (the form will probably be an infopath form so would be using web services or other(?) to achieve this. Question(s) being... Given that the user will not have permissions to do this, can I elevate the process (impersonate maybe?) to allow this creation?Is there a way to query SP (via the web service) to see if the site name/url requested is already in use? I'd need to trap this and prompt the user to try a different name.Do site permission group names have to be unique within a site collection? For example can all the sub sites have 3 default groups of Project Visitors, Project Members and Project Owners?
July 5th, 2012 12:22am

1st Bullet: Using .NET code, I believe this is possible. 2nd Bullet: Probably, but if not, then you code write the names & URLs into a list, and hit that list instead. 3rd Bullet: Group Names do need to be unique, but so does the URL. Thus, if you use the URL name as the group name, then you should never have a conflict. Steve Clark, MCTS | Twin-Soft.com & Easy Bins Dumpster Rentals of Northern VA. (Specializing in driveway-sized roll-off dumpsters.)
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2012 10:10am

Hi QPR JAY 1. Yes, you can develop an InfoPath form with code behind, however your form will have to have elevated permission to accomplish automation. Also your forms have to be signed and published as an administrator approved form templates. See Manage administrator-approved form templates (SharePoint Server 2010) (http://technet.microsoft.com/en-us/library/cc262921.aspx) MOSS 2007 http://technet.microsoft.com/en-us/library/cc262921(v=office.12) 2. You can check your site whether exist or not using the following code and replace ... with return true or create a function to return true if site exist or return false otherwise- string strUrl = "http://Server_Name/sites/Site_Name/Subsite_Name/default.aspx"; using (SPSite oSiteCollection = new SPSite(strUrl)) { using(SPWeb oWebsite = oSiteCollection.OpenWeb()) { ... } } Source from MSDN for SP 2010 http://msdn.microsoft.com/en-us/library/ms473155.aspx For SP 2007 http://msdn.microsoft.com/en-us/library/ms473155(v=office.12).aspx 3. Site collection groups are inherited to your subsites,as long as it has not broken inheritance, so plan accordingly. More about planning your permissions SP 2010 (http://technet.microsoft.com/en-us/library/cc287752.aspx) SP 2007 (http://technet.microsoft.com/en-us/library/cc262778(v=office.12) HTH! MCITP: SharePoint 2010 Administrator MCTS - MOSS 2007 Configuring, .NET 2.0 | SharePoint Architect | Evangelist | http://www.sharepointdeveloper.in/ http://ramakrishnaraja.blogspot.com/
July 5th, 2012 11:25am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics