-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Authorize active_admin_comments in resource#show #5555
Authorize active_admin_comments in resource#show #5555
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5555 +/- ##
==========================================
+ Coverage 98.38% 98.38% +<.01%
==========================================
Files 293 293
Lines 11073 11078 +5
==========================================
+ Hits 10894 10899 +5
Misses 179 179
Continue to review full report at Codecov.
|
@amiuhle We no longer maintain 1-3-stable, is this issue present in the master branch? |
9ccffae
to
adc87f3
Compare
@deivid-rodriguez I couldn't get all the tests to pass on I rebased on master and changed the target branch. |
Thank you! Could you add a test for this? |
ea20cb0
to
18ea41b
Compare
Added two feature specs. Would you consider cherry-picking and releasing this as Edit: Maybe a fix for #5554 could also be addressed in a bugfix release. |
lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few comments. Looking good!
e16e326
to
71246db
Compare
@deivid-rodriguez I had changed the functionality of Everything else is resolved, and I rebased a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amiuhle I added a few minor comments about the specs. Thanks for your effort!
71246db
to
2eab064
Compare
@deivid-rodriguez Using I did another rebase on master, so the changes you made in #5585 are gone. Let me know whether you'd like me to rebase the changes from the last commit into the corresponding previous commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amiuhle I think it is fine as it is, thanks!
If I was to cleanup the history of this PR, I would probably squash everything into one commit, up to you! |
@deivid-rodriguez Should I add documentation? I think I could provide a Also, could you take a look at #5554? |
Sure, yes! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I was to cleanup the history of this PR, I would probably squash everything into one commit, up to you!
I'll squash them. Just in case you didn't know this, you can do that via GitHub if you enable it in the repository settings: https://blog.github.com/2016-04-01-squash-your-commits/
lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb
Show resolved
Hide resolved
lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb
Show resolved
Hide resolved
Yeah, I think we agreed a while ago to not enable this merge option and consistently use the standard merge, but I would personally enable it: it's handy and it helps in cases like this one. |
@deivid-rodriguez I expanded on the existing pundit templates from the specs, since they're already referenced in the doumentation. I'm not 100% happy with what the I don't want to spend much more time on this PR, if you think it's okay like this, or have a good idea how to improve the last commit, I'll add some modifications. Otherwise I'll just remove the last commit and squash so you can merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amiuhle I think it is ok like this! Squash and I'll reapprove!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for the help here! 👍🏻
Check whether user is authorized to view comments when displaying them in resources#show.