Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for authorize after security breach Dec 2022 #3097

Closed
wants to merge 2 commits into from

Conversation

raycarrick-ed
Copy link
Contributor

Fixes DCC #682 .

Changes proposed in this PR:

  • results from a scan of all authorize statements to try fix any further issues after #3084

Copy link
Contributor

@briri briri left a comment

Choose a reason for hiding this comment

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

Looks good @raycarrick-ed. I think user_signed_in? would be a better check than @user.is_a?(User)

@@ -82,4 +86,12 @@ def update_guidances_list?
@plan.editable_by?(@user.id)
end

def privately_visible?
@user.is_a?(User)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to change these 2 to user_signed_in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. That's better.

@briri
Copy link
Contributor

briri commented Jan 25, 2022

thanks for cleaning these policies up!

Helper user_signed_in? from devise isn't available in policy files. So using @user.present? instead which should be equivalent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants