small manage_assignments cleanup
Change-Id: Ie8bc261ef5bf5f27f5450e355d077dbad679dc5d Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271084 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> QA-Review: Simon Williams <simon@instructure.com> Product-Review: Simon Williams <simon@instructure.com>
This commit is contained in:
parent
41eb604de0
commit
566d6c29af
|
@ -799,7 +799,7 @@ class AssignmentsApiController < ApplicationController
|
|||
scope = SortsAssignments.bucket_filter(scope, params[:bucket], session, user, @current_user, @context, submissions_for_user)
|
||||
end
|
||||
|
||||
scope = scope.where(post_to_sis: value_to_boolean(params[:post_to_sis])) if params[:post_to_sis] && authorized_action(@context, user, :manage_assignments)
|
||||
scope = scope.where(post_to_sis: value_to_boolean(params[:post_to_sis])) if params[:post_to_sis]
|
||||
|
||||
if params[:assignment_ids]
|
||||
if params[:assignment_ids].length > Api.max_per_page
|
||||
|
|
|
@ -1725,7 +1725,7 @@ class Assignment < ActiveRecord::Base
|
|||
can :manage_files_delete
|
||||
|
||||
given { |user, session| self.context.grants_right?(user, session, :manage_assignments) }
|
||||
can :create and can :read and can :attach_submission_comment_files
|
||||
can :create and can :read
|
||||
|
||||
given { |user, session| self.user_can_update?(user, session) }
|
||||
can :update
|
||||
|
|
Loading…
Reference in New Issue