summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20130411151900_add_presence_permission_to_groups.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20130411151900_add_presence_permission_to_groups.rb b/db/migrate/20130411151900_add_presence_permission_to_groups.rb
new file mode 100644
index 0000000..277eaee
--- /dev/null
+++ b/db/migrate/20130411151900_add_presence_permission_to_groups.rb
@@ -0,0 +1,11 @@
+class AddInitialGroups < ActiveRecord::Migration
+ def up
+ user_sip_accounts = Group.where(:name => 'user_sip_accounts').first
+ if user_sip_accounts
+ user_sip_accounts.group_permissions.create(:permission => 'presence', :target_group_id => user_sip_accounts.id)
+ end
+ end
+
+ def down
+ end
+end