Skip to content

LG-2246 Fix phone edit authorization issues#3410

Merged
jmhooper merged 9 commits intomasterfrom
jmhooper-fix-unauthorized-phone-spec
Nov 18, 2019
Merged

LG-2246 Fix phone edit authorization issues#3410
jmhooper merged 9 commits intomasterfrom
jmhooper-fix-unauthorized-phone-spec

Conversation

@jmhooper
Copy link
Contributor

Why: There was a bug that was resulting in a 500 error if someone tried to edit a phone that did not belong to them by changing the ID in the URL. This happened because the resulting PhoneConfiguration query returned nil resulting in a NoMethodError on NilClass when we tried to read things from the phone configuration.

This commit fixes this issue and a few others by breaking the edit phone funcitonality out of the phones controller into its own controller.

**Why**: There was a bug that was resulting in a 500 error if someone tried to edit a phone that did not belong to them by changing the ID in the URL. This happened because the resulting `PhoneConfiguration` query returned nil resulting in a `NoMethodError` on `NilClass` when we tried to read things from the phone configuration.

This commit fixes this issue and a few others by breaking the edit phone funcitonality out of the phones controller into its own controller.
@jmhooper jmhooper marked this pull request as ready for review November 14, 2019 20:46
@jmhooper
Copy link
Contributor Author

@achapm: I think I have addressed all of your comments. Wanna take another look?

end
end

def delete
Copy link
Contributor Author

@jmhooper jmhooper Nov 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action should have a check for whether this will result in less than 2 MFA configs

Copy link
Contributor

@achapm achapm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jmhooper jmhooper merged commit 45a2ef9 into master Nov 18, 2019
@jmhooper jmhooper deleted the jmhooper-fix-unauthorized-phone-spec branch November 18, 2019 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants