socialforge/db/migrate/20140626012511_modify_stude...

14 lines
308 B
Ruby

# -*coding:utf-8 -*-
class ModifyStudentRoles < ActiveRecord::Migration
def change
# 修改学生权限
# 添加回复讨论区权限
role = Role.find_by_name('学生')
if role
role.permissions.append(:add_messages)
role.save(:validate => false)
end
end
end