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

Rename acting_user accessor in policies #834

Merged
merged 2 commits into from
Mar 3, 2021

Conversation

solebared
Copy link
Collaborator

@solebared solebared commented Jan 20, 2021

Why

Definite tradeoffs in both directions but after a group discussion, felt that new engineers having to investigate/learn another term wasn't worth the benefits of the explicit qualification.

Pre-Merge Checklist

  • Talk to @bhaibel
  • All outstanding questions and concerns have been resolved
  • Any next steps that seem like good ideas have been created as issues for future discussion & implementation

What

  1. Dropping back to user -- the term used in pundit docs/examples with the understanding that any other users in play can be qualified as needed.
  2. Rename a couple of related private methodes in UserPolicy and PersonPolicy
  3. Also renames original_scope to scope. Doesn't feel like the qualification is necessary so falling back to the
    term used in pundit docs/examples.

Note: this changeset builds on #833 which first drops some spec code that uses the same term.

Outstanding Questions, Concerns and Other Notes

We discussed that we'd love @bhaibel to weigh in on this since she likely considered these tradeoffs. We'd ideally not merge these suggested changes until we have a chance to talk to her.

Base automatically changed from drop-pundit-shared-contexts to main January 21, 2021 20:59
@solebared solebared mentioned this pull request Jan 26, 2021
30 tasks
person_attached_to_acting_user? ||
sys_admin? ||
admin?
own_person? || sys_admin? || admin?
Copy link
Collaborator

Choose a reason for hiding this comment

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

own_person takes me a minute to translate, but, I don't have a different suggestion atm that doesn't have a namespace issue. :)

@solebared solebared force-pushed the rename-acting-user-in-policies branch from 978d35b to dca3c31 Compare February 14, 2021 22:54
@solebared
Copy link
Collaborator Author

@maebeale , i brought this up to date with latest main. Please give it another look when you get a chance.

@solebared solebared marked this pull request as ready for review February 25, 2021 03:35
Definite tradeoffs in both directions but after a group discussion, felt
that new engineers having to investigate/learn another term wasn't worth
the benefits of the explicit qualification. Dropping back to the term
used in pundit docs/examples with the understanding that any _other_
users in play can be qualified as needed.
Doesn't feel like the qualification is necessary, falling back to the
term used in pundit docs/examples.
@solebared solebared force-pushed the rename-acting-user-in-policies branch from dca3c31 to 4098a99 Compare February 25, 2021 03:39
@solebared solebared merged commit 22024f2 into main Mar 3, 2021
@solebared solebared deleted the rename-acting-user-in-policies branch March 3, 2021 16:05
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