学生角色添加回复讨论区权限

This commit is contained in:
nwb 2014-06-26 11:43:03 +08:00
parent b4af75f289
commit f8e5c2358a
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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