Add project approval workflow
authorThomas Kjeldahl Nilsson <thomas@kjeldahlnilsson.net>
Fri, 29 Jun 2012 10:12:11 +0000 (12:12 +0200)
committerThomas Kjeldahl Nilsson <thomas@kjeldahlnilsson.net>
Sat, 30 Jun 2012 21:12:47 +0000 (23:12 +0200)
commitbefd9ff9fdced6a7f55bc49824cb4f0067d3763b
treefd15c047049e946c0fbb16fee488ac9310a1840c
parent54612c63669ce2bc74fa2a7beacc630ebe3c7e93
Add project approval workflow

Enabled by existing only_site_admins_can_create_projects setting.
Site admins can still create projects like usual. Regular users
are redirected to a separate project proposal page, where they input
title and description. Submit, and message is fired off to each site
admin, prompting for reviewing the new proposal at /admin/project_proposals.
Rejection removes the proposal and notifies useser. Approval
creates a proper new project with same title and description as
the proposal. Both rejections and approvals are notified to the
originating user with a message/mail.
14 files changed:
app/controllers/admin/project_proposals_controller.rb [new file with mode: 0644]
app/controllers/projects_controller.rb
app/models/project_proposal.rb [new file with mode: 0644]
app/models/user.rb
app/views/admin/project_proposals/index.html.erb [new file with mode: 0644]
app/views/admin/project_proposals/new.html.erb [new file with mode: 0644]
config/gitorious.sample.yml
config/routes.rb
db/migrate/20120629102742_create_project_proposals.rb [new file with mode: 0644]
db/schema.rb
test/fixtures/project_proposals.yml [new file with mode: 0644]
test/functional/admin/project_proposals_controller_test.rb [new file with mode: 0644]
test/functional/projects_controller_test.rb
test/unit/project_proposal_test.rb [new file with mode: 0644]