学生角色添加回复讨论区权限
This commit is contained in:
parent
b4af75f289
commit
f8e5c2358a
|
@ -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
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# 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|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
|
Loading…
Reference in New Issue