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 0032afedb..0d20d786d 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