Skip to content

Commit

Permalink
Hotfix to allow edit action even if user can't update (#12826)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonksthebear authored May 26, 2023
1 parent 1382465 commit 9bd9358
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module Mobile
module V0
class GenderIdentityController < ApplicationController
before_action { authorize :demographics, :access_update? }
before_action(only: :update) { authorize :demographics, :access_update? }
before_action { authorize :mpi, :queryable? }

def edit
Expand Down
6 changes: 3 additions & 3 deletions modules/mobile/spec/request/gender_identity_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@
end

describe 'GET /mobile/v0/gender_identity/edit' do
context 'returns 403' do
it 'returns 402', :aggregate_failures do
context 'returns 200' do
it 'returns 200', :aggregate_failures do
get('/mobile/v0/user/gender_identity/edit', headers: iam_headers_no_camel)
expect(response).to have_http_status(:forbidden)
expect(response).to have_http_status(:ok)
end
end
end
Expand Down

0 comments on commit 9bd9358

Please sign in to comment.