Browse files


# Project ownership

The next goal for Agility is to move to a full multi-user application, where users can create their own projects and control who has access to them. Rather than make this change in one go, we'll start with a small change that doesn't do much by itself, but is a step in the right direction: making projects be owned by users.

Add the following to the Project model:


There's a Hobo extension there: `:creator => true` tells Hobo that when creating one of these things, the `owner` association should be automatically set up to be the user doing the create.
  • Loading branch information...
bryanlarsen authored and iox committed Jun 3, 2013
1 parent dbc0c3d commit 81f65a0f3fc90e5135e689c4306360832e21f8ce
Showing with 2 additions and 0 deletions.
  1. +2 −0 app/models/project.rb
@@ -13,6 +13,8 @@ class Project < ActiveRecord::Base
children :stories
belongs_to :owner, :class_name => "User", :creator => true, :inverse_of => :projects
# --- Permissions --- #
def create_permitted?

0 comments on commit 81f65a0

Please sign in to comment.