课程权限添加(部分)

This commit is contained in:
z9hang 2014-06-04 17:39:11 +08:00
parent 8fb82bbdc4
commit ae5ced6a51
3 changed files with 38 additions and 6 deletions

View File

@ -454,6 +454,25 @@ zh:
permission_manage_subtasks: 管理子任务
permission_view_journals_for_messages: 查看留言
permission_view_courses: 查看课程列表
permission_new_course: 新建课程
permission_configure_course: 配置课程
permission_close_course: 关闭/重开课程
permission_new_assignment: 新建任务
permission_edit_assignment: 编辑任务
permission_delete_assignment: 删除任务
permission_new_placeholder: 新建占位
permission_edit_placeholder: 编辑占位
permission_delete_placeholder: 删除占位
permission_commit_content: 提交内容
permission_new_course_notify: 发布课程通知
permission_edit_course_notify: 编辑课程通知
permission_delete_course_notify: 删除课程通知
permission_view_assignment: 查看任务
permission_view_placeholder: 查看占位
permission_view_course_messages: 查看留言
permission_view_real_name: 查看真名
project_module_issue_tracking: 问题跟踪
project_module_time_tracking: 时间跟踪

View File

@ -172,6 +172,7 @@ default_projects_modules:
- boards
- calendar
- gantt
- course
default_projects_tracker_ids:
serialized: true
default:

View File

@ -179,13 +179,25 @@ Redmine::AccessControl.map do |map|
end
#课程权限模块
map.project_module :course do
map.project_module :course do |map|
map.permission :view_courses,{:projects => [:course]},:read => true
end
#作业模块权限
map.project_module :bids do |map|
map.permission :view_homework_attaches, {:bids => [:show, :show_project, :revision]}, :read => true
#map.permission :new_course, {}, :read => true
#map.permission :configure_course,{},:read => true
#map.permission :close_course,{},:read => true
map.permission :new_assignment,{:projects => [:new_homework]},:read => true
map.permission :edit_assignment,{:bids => [:edit]},:read => true
map.permission :delete_assignment,{:bids => [:homework_destroy]},:read => true
map.permission :new_placeholder,{:homework_attach => [:new]},:read => true
map.permission :edit_placeholder,{},:read => true
map.permission :delete_placeholder,{},:read => true
map.permission :commit_content,{},:read => true
#map.permission :new_course_notify,{},:read => true
#map.permission :edit_course_notify,{},:read => true
#map.permission :delete_course_notify,{},:read => true
map.permission :view_assignment,{},:read => true
map.permission :view_placeholder,{},:read => true
map.permission :view_course_messages,{},:read => true
map.permission :view_real_name,{},:read => true
end
map.project_module :boards do |map|