Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've created a SP2010 Web Template based on a publishing site.
I've added a feature receiver which removes all default SharePoint groups (Activated through my onet.xml file).
Strangly enough the default groups:
Owners, Members, Visitors
Are still appearing I thought putting my feature last in the onet.xml file (just before )should only executed it at the end of the site creation but it looks creation of the default groups happens after feature activation?

Does anyone know how to create a new site with not a single default group?

share|improve this question
add comment

4 Answers

up vote 0 down vote accepted

The site provisioning process creates those groups after your site-def and features have finished running, and also after any WebAdded event receivers. The same applies to new subsites being added to the top navigation bar.

So I don't think there is any way short of a timer job or a master page delegate control that can achieve what you're asking.

share|improve this answer
add comment

Also

CurrentWeb.BreakRoleInheritance(false);

deletes groups.

share|improve this answer
add comment

Use

<ExecuteUrl Url="_layouts/Sibur.Archive/Configure.aspx?Mode=AfterCreation" />

to execute code to delete default groups. This page is custom.

share|improve this answer
add comment

You can start a worker process in the activation code that will wait for the web to be provisioned and then remove the permissions you want.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.