From f8e5c2358ad7fcbc1127e2fb87a54c471780b75c Mon Sep 17 00:00:00 2001 From: nwb Date: Thu, 26 Jun 2014 11:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E8=A7=92=E8=89=B2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=9B=9E=E5=A4=8D=E8=AE=A8=E8=AE=BA=E5=8C=BA=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20140626012511_modify_student_roles.rb | 13 +++++++++++++ db/schema.rb | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20140626012511_modify_student_roles.rb diff --git a/db/migrate/20140626012511_modify_student_roles.rb b/db/migrate/20140626012511_modify_student_roles.rb new file mode 100644 index 000000000..1db0a734b --- /dev/null +++ b/db/migrate/20140626012511_modify_student_roles.rb @@ -0,0 +1,13 @@ +# -*coding:utf-8 -*- +class ModifyStudentRoles < ActiveRecord::Migration + def change + # 修改学生权限 + # 添加回复讨论区权限 + role = Role.find_by_name('学生') + if role + role.permissions.append(:add_messages) + role.save + end + end + +end diff --git a/db/schema.rb b/db/schema.rb index 67da188af..44c464638 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20140618155324) do +ActiveRecord::Schema.define(:version => 20140626012511) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false