aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2011-03-08 12:25:55 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2011-03-08 12:25:55 +0100
commit1d7c1c4a194856c9e82e644d16aa8bba674e70fb (patch)
treea685400d679de1ff8f97dd633eeab5384ee1ca8e /db
parent5b3773e48005308d5f2666903f23a04213e0bad8 (diff)
downloadecs2-1d7c1c4a194856c9e82e644d16aa8bba674e70fb.tar.gz
ecs2-1d7c1c4a194856c9e82e644d16aa8bba674e70fb.zip
New authorization.
The authorization resource (/sys/auths) functionality is now provided through the standard application resource infrastructure.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20110303145153_create_auths.rb14
-rw-r--r--db/schema.rb9
-rw-r--r--db/seeds.rb5
3 files changed, 27 insertions, 1 deletions
diff --git a/db/migrate/20110303145153_create_auths.rb b/db/migrate/20110303145153_create_auths.rb
new file mode 100644
index 0000000..ba3a8fb
--- /dev/null
+++ b/db/migrate/20110303145153_create_auths.rb
@@ -0,0 +1,14 @@
+class CreateAuths < ActiveRecord::Migration
+ def self.up
+ create_table :auths do |t|
+ t.string :one_touch_hash
+ t.integer :message_id
+
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :auths
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 40fccd3..f096724 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -9,7 +9,14 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20110103145840) do
+ActiveRecord::Schema.define(:version => 20110303145153) do
+
+ create_table "auths", :force => true do |t|
+ t.string "one_touch_hash"
+ t.integer "message_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
create_table "communities", :force => true do |t|
t.string "name"
diff --git a/db/seeds.rb b/db/seeds.rb
index a49fc81..66eb1d8 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -24,8 +24,13 @@
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Major.create(:name => 'Daley', :city => cities.first)
Organization.create :name => "not available", :description => "For anonymous participants.", :abrev => "n/a"
+Organization.create :name => "system", :description => "Internal ECS community.", :abrev => "sys"
+Participant.create :name => "ecs", :description => "ECS system participant", :dns => 'n/a',
+ :community_selfrouting => false, :organization_id => Organization.find_by_name("system").id
Community.create :name => "public", :description => "For anonymous participants."
RessourceMonitor.create :name => "queue"
%w(created destroyed updated notlinked).each do |evt|
EvType.create :name => evt
end
+Ressource.create :namespace => 'sys', :ressource => 'auth', :postroute => true, :events => false
+