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

[#1005] Hide individual attachment fixes #7409

Merged
merged 2 commits into from
Nov 3, 2022
Merged

[#1005] Hide individual attachment fixes #7409

merged 2 commits into from
Nov 3, 2022

Conversation

gbp
Copy link
Member

@gbp gbp commented Nov 2, 2022

Relevant issue(s)

Connected to #1005

What does this do?

  1. Removes CanCanCan Ability scopes
  2. Fixes exception rendering delivery statues

gbp added 2 commits November 2, 2022 15:45
These are causing issues in production when starting the application.

Seems to be due to the large number of requests in WDTK production and
the scopes and/or CanCanCan not being able to correctly handle this.

Reverting back to using blocks but keeping the more verbose `can :_read`
abilities from bdf93b8
Rename partial variable message to prominenceable.

Missed in f246c5a
@gbp gbp marked this pull request as ready for review November 2, 2022 16:37
@gbp gbp requested a review from garethrees November 2, 2022 16:37
@gbp
Copy link
Member Author

gbp commented Nov 2, 2022

I have tested ability.rb on production using the Rails console. Prior to these changes running Ability.guest would hang, now it returns near instantly.

@gbp
Copy link
Member Author

gbp commented Nov 2, 2022

Running Ability.new(pro_admin_user), Ability.new(admin_user) and Ability.new(other_user) all work correctly too.

Copy link
Member

@garethrees garethrees left a comment

Choose a reason for hiding this comment

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

Haven't run but looks fine in principle and the specs all pass.

@gbp gbp merged commit 4e25bd5 into develop Nov 3, 2022
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