summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-04-12 11:45:05 +0200
committerPeter Kozak <spag@golwen.net>2013-04-12 11:45:05 +0200
commit12dc5e76ea0499f7f3e7ff67a37d77e0e9d35e5e (patch)
tree4206e6a1efb9904d9f1fb48e1af774988bbdffc3 /db
parent4c18abe0693475c6676fb1e9ebc0ac2f92b7f39a (diff)
presence permission added
Diffstat (limited to 'db')
-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