limit quiz and results scopes to current_user access

now managers and reviewers can only see quizzes and completed results for those quizzes they have been assigned to.
This commit is contained in:
Mark Moser
2017-05-03 16:25:32 -05:00
parent 49035929fb
commit 255e430abd
6 changed files with 11 additions and 8 deletions

View File

@ -15,7 +15,7 @@ class QuizPolicyTest < PolicyAssertions::Test
test 'should allow manager to scope' do
scope = QuizPolicy::Scope.new(users(:manager), Quiz).resolve
assert_equal Quiz.count, scope.count
assert_equal users(:manager).quizzes.count, scope.count
end
test 'should allow reviewer to scope' do