admin能访问问卷列表
This commit is contained in:
parent
11191f6743
commit
851b468e8d
|
@ -23,7 +23,7 @@ class PollController < ApplicationController
|
|||
|
||||
def show
|
||||
@poll = Poll.find params[:id]
|
||||
if @poll.polls_status != 2 && !User.current.allowed_to?(:as_teacher,@course)
|
||||
if @poll.polls_status != 2 && (!User.current.allowed_to?(:as_teacher,@course) || User.current.admin?)
|
||||
render_403
|
||||
return
|
||||
end
|
||||
|
@ -393,7 +393,7 @@ class PollController < ApplicationController
|
|||
end
|
||||
|
||||
def is_member_of_course
|
||||
render_403 unless(@course && User.current.member_of_course?(@course))
|
||||
render_403 unless(@course && (User.current.member_of_course?(@course) || User.current.admin?))
|
||||
end
|
||||
|
||||
def is_course_teacher
|
||||
|
|
Loading…
Reference in New Issue