Howto use sites without superadmin

This is how it’s supposed to work, however it doesn’t work right now. Anyway you should create a site council if you don’t want your site’s network settings to be altered. Enable super_admin to configure the site and disable it once you got everything set up.

  • Put your database configuration in config/database.yml
  • setup the database:
    rake db:schema:load
    rake db:migrate
    rake cg:load_default_data
  • Edit “config/crabgrass.production.yml” to your needs (remove or comment the super_admin line to disable it)
  • run the following for every site you configured:
    rake cg:site:create NAME=name-of-the-site
  • now fire up “script/console” and do the following (for each site)
    Site.find_by_name("name-of-the-site").update_attributes!(:domain => "", :title => "Title for the site", :default => false)
    set :default to “true” instead if you want this site to be used for all domains where no site is configured.
  • For every site which needs a site home, you need to create a network. Create them via your browser now.
    Make sure to remember the “Link Name” of those networks, as you need them now.
Back in script/console: Site.find_by_name("name-of-the-site").update_attributes!(:network => Network.find_by_name("link-name-of-network"), :has_networks => false) Set :has_networks to “true” if you want users of that site to be able to create new networks.
  • Now restart crabgrass and visit one of your sites. If the network is configured correctly you should see the “Home” tab
    in the navigation now.
  • If you navigate to that “Home” tab, you will find a link “Network Settings” on the right bottom. Go there and switch
    to “Permissions” tab. Click “Create a new council” and enter a name. Now members of this council should be able to
    reach the “/admin” tab.

I altered the cg:site:create script so it takes the following parameters:
*NAME:: as before
*DOMAIN:: domain this site is for
*TITLE:: title displayed for the site
*NETWORK:: name of the network to use for site home
*EMAIL:: email sender for that site – notifications and so on use this.


Azul, with your changes should a network be created before the ‘rake cg:site:create NAME=name-of-the-site’ is run?

Also, is it necessary to create a group that is part of the network?


micah, currently you have to create a network first if you want to use the NETWORK parameter. And no – there is no necessity for a group except if you want to use it for superadmin, moderation or site-admin.

I will create a proposal for a new process for initial site configuration.