Module: API::Helpers::ProtectedBranchesHelpers

Extended by:
ActiveSupport::Concern, Grape::API::Helpers
Defined in:
lib/api/helpers/protected_branches_helpers.rb

Instance Method Summary collapse

Instance Method Details

#authorize_create_protected_branch!Object



9
10
11
# File 'lib/api/helpers/protected_branches_helpers.rb', line 9

def authorize_create_protected_branch!
  authorize!(:create_protected_branch, user_project)
end

#authorize_destroy_protected_branch!(protected_branch) ⇒ Object



17
18
19
# File 'lib/api/helpers/protected_branches_helpers.rb', line 17

def authorize_destroy_protected_branch!(protected_branch)
  authorize!(:read_protected_branch, protected_branch)
end

#authorize_update_protected_branch!(protected_branch) ⇒ Object



13
14
15
# File 'lib/api/helpers/protected_branches_helpers.rb', line 13

def authorize_update_protected_branch!(protected_branch)
  authorize!(:update_protected_branch, protected_branch)
end