Commit 585a53c4158e098c7c916cca6b252efbe06a6334
1 parent
aa1f1eb6
Exists in
master
and in
4 other branches
can_create_group, can_create_team boolean fields for user
Showing
2 changed files
with
14 additions
and
1 deletions
Show diff stats
| @@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
| 1 | +class AddUserPermissions < ActiveRecord::Migration | ||
| 2 | + def up | ||
| 3 | + add_column :users, :can_create_group, :boolean, default: true, null: false | ||
| 4 | + add_column :users, :can_create_team, :boolean, default: true, null: false | ||
| 5 | + end | ||
| 6 | + | ||
| 7 | + def down | ||
| 8 | + remove_column :users, :can_create_group | ||
| 9 | + remove_column :users, :can_create_team | ||
| 10 | + end | ||
| 11 | +end |
db/schema.rb
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | # | 11 | # |
| 12 | # It's strongly recommended to check this file into your version control system. | 12 | # It's strongly recommended to check this file into your version control system. |
| 13 | 13 | ||
| 14 | -ActiveRecord::Schema.define(:version => 20130110172407) do | 14 | +ActiveRecord::Schema.define(:version => 20130125090214) do |
| 15 | 15 | ||
| 16 | create_table "events", :force => true do |t| | 16 | create_table "events", :force => true do |t| |
| 17 | t.string "target_type" | 17 | t.string "target_type" |
| @@ -267,6 +267,8 @@ ActiveRecord::Schema.define(:version => 20130110172407) do | @@ -267,6 +267,8 @@ ActiveRecord::Schema.define(:version => 20130110172407) do | ||
| 267 | t.string "extern_uid" | 267 | t.string "extern_uid" |
| 268 | t.string "provider" | 268 | t.string "provider" |
| 269 | t.string "username" | 269 | t.string "username" |
| 270 | + t.boolean "can_create_group", :default => true, :null => false | ||
| 271 | + t.boolean "can_create_team", :default => true, :null => false | ||
| 270 | end | 272 | end |
| 271 | 273 | ||
| 272 | add_index "users", ["admin"], :name => "index_users_on_admin" | 274 | add_index "users", ["admin"], :name => "index_users_on_admin" |