Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
5cf7a5334f
|
@ -499,19 +499,19 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def render_403(options={})
|
def render_403(options={})
|
||||||
@project = nil
|
@project = nil
|
||||||
#render_error({:message => :notice_not_authorized, :status => 403}.merge(options))
|
render_error({:message => :notice_not_authorized, :status => 403}.merge(options),'common/403')
|
||||||
render :template => 'common/403'
|
#render :template => 'common/403'
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_404(options={})
|
def render_404(options={})
|
||||||
#render_error({:message => :notice_file_not_found, :status => 404}.merge(options))
|
render_error({:message => :notice_file_not_found, :status => 404}.merge(options),'common/404')
|
||||||
render :template => 'common/404'
|
#render :template => 'common/404'
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
# Renders an error response
|
# Renders an error response
|
||||||
def render_error(arg)
|
def render_error(arg,template = 'common/error')
|
||||||
arg = {:message => arg} unless arg.is_a?(Hash)
|
arg = {:message => arg} unless arg.is_a?(Hash)
|
||||||
@message = arg[:message]
|
@message = arg[:message]
|
||||||
@lay = arg[:layout]
|
@lay = arg[:layout]
|
||||||
|
@ -521,9 +521,9 @@ class ApplicationController < ActionController::Base
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
if @lay
|
if @lay
|
||||||
render :template => 'common/error', :layout => @lay,:status => @status
|
render :template => template, :layout => @lay,:status => @status
|
||||||
else
|
else
|
||||||
render :template => 'common/error', :layout => use_layout, :status => @status
|
render :template => template, :layout => use_layout, :status => @status
|
||||||
end
|
end
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -499,7 +499,7 @@ en:
|
||||||
permission_view_students: View students
|
permission_view_students: View students
|
||||||
permission_export_homeworks: Export homeworks
|
permission_export_homeworks: Export homeworks
|
||||||
permission_notificationcomment_contestnotifications: Add the notice of contest comments
|
permission_notificationcomment_contestnotifications: Add the notice of contest comments
|
||||||
|
permission_upload_attachments: Uploading resource
|
||||||
|
|
||||||
project_module_issue_tracking: Issue tracking
|
project_module_issue_tracking: Issue tracking
|
||||||
project_module_time_tracking: Time tracking
|
project_module_time_tracking: Time tracking
|
||||||
|
|
|
@ -497,6 +497,7 @@ zh:
|
||||||
permission_projects_attachments_download: 项目附件下载
|
permission_projects_attachments_download: 项目附件下载
|
||||||
permission_course_attachments_download: 课程附件下载
|
permission_course_attachments_download: 课程附件下载
|
||||||
permission_contest_attachments_download: 竞赛附件下载
|
permission_contest_attachments_download: 竞赛附件下载
|
||||||
|
permission_upload_attachments: 资源上传
|
||||||
|
|
||||||
project_module_issue_tracking: 问题跟踪
|
project_module_issue_tracking: 问题跟踪
|
||||||
project_module_time_tracking: 时间跟踪
|
project_module_time_tracking: 时间跟踪
|
||||||
|
|
|
@ -142,7 +142,7 @@ module Redmine
|
||||||
elsif a && attachment['is_public_checkbox']
|
elsif a && attachment['is_public_checkbox']
|
||||||
a.is_public = true
|
a.is_public = true
|
||||||
end
|
end
|
||||||
set_attachment_public(a)
|
set_attachment_public(a) if a
|
||||||
next unless a
|
next unless a
|
||||||
a.description = attachment['description'].to_s.strip
|
a.description = attachment['description'].to_s.strip
|
||||||
a.attachtype = @curattachment_type;
|
a.attachtype = @curattachment_type;
|
||||||
|
|
|
@ -99,6 +99,7 @@ Redmine::AccessControl.map do |map|
|
||||||
map.permission :add_subprojects, {:projects => [:new, :create]}, :require => :member ,:belong_to_project => true
|
map.permission :add_subprojects, {:projects => [:new, :create]}, :require => :member ,:belong_to_project => true
|
||||||
#错的权限,先注释掉
|
#错的权限,先注释掉
|
||||||
#map.permission :view_journals_for_messages, {:gantts => [:show, :update]}, :read => true
|
#map.permission :view_journals_for_messages, {:gantts => [:show, :update]}, :read => true
|
||||||
|
map.permission :upload_attachments,{:attachments => :upload},:require => :loggedin
|
||||||
|
|
||||||
map.permission :quote_project, {},:require => :member,:belong_to_contest => true
|
map.permission :quote_project, {},:require => :member,:belong_to_contest => true
|
||||||
map.permission :is_manager,{},:require => :member ,:belong_to_project => true
|
map.permission :is_manager,{},:require => :member ,:belong_to_project => true
|
||||||
|
@ -159,13 +160,13 @@ Redmine::AccessControl.map do |map|
|
||||||
:queries => :index,
|
:queries => :index,
|
||||||
:reports => [:issue_report, :issue_report_details]},
|
:reports => [:issue_report, :issue_report_details]},
|
||||||
:read => true
|
:read => true
|
||||||
map.permission :add_issues, {:issues => [:new, :create, :update_form], :attachments => :upload}
|
map.permission :add_issues, {:issues => [:new, :create, :update_form]}
|
||||||
map.permission :edit_issues, {:issues => [:edit, :update, :bulk_edit, :bulk_update, :update_form], :journals => [:new], :attachments => :upload}
|
map.permission :edit_issues, {:issues => [:edit, :update, :bulk_edit, :bulk_update, :update_form], :journals => [:new]}
|
||||||
map.permission :manage_issue_relations, {:issue_relations => [:index, :show, :create, :destroy]}
|
map.permission :manage_issue_relations, {:issue_relations => [:index, :show, :create, :destroy]}
|
||||||
map.permission :manage_subtasks, {}
|
map.permission :manage_subtasks, {}
|
||||||
map.permission :set_issues_private, {}
|
map.permission :set_issues_private, {}
|
||||||
map.permission :set_own_issues_private, {}, :require => :loggedin
|
map.permission :set_own_issues_private, {}, :require => :loggedin
|
||||||
map.permission :add_issue_notes, {:issues => [:edit, :update, :update_form], :journals => [:new], :attachments => :upload}
|
map.permission :add_issue_notes, {:issues => [:edit, :update, :update_form], :journals => [:new]}
|
||||||
map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
|
map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
|
||||||
map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
|
map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
|
||||||
map.permission :view_private_notes, {}, :read => true, :require => :member
|
map.permission :view_private_notes, {}, :read => true, :require => :member
|
||||||
|
|
Loading…
Reference in New Issue