Context Logic: Fully move tag changes into context#722
Open
Meow wants to merge 1 commit into
Open
Conversation
Contributor
|
fixes #600 |
liamwhite
reviewed
Jul 11, 2026
|
|
||
| Returns `{:ok, reverted_tag_changes}`, `{:error, :unauthorized}`, or | ||
| `{:error, :invalid_ids}` when `ids` is not a list. Failures inside the | ||
| batch update surface as their own `{:error, _}` shapes. |
Contributor
There was a problem hiding this comment.
"as their own {:error, _} shapes" - unhelpful. Are the error shapes known?
Comment on lines
+27
to
+30
| `actor` may be `nil` for an anonymous visitor. It may also be a | ||
| `Philomena.Attribution.Actor`: permissions are decided by its `user` alone - | ||
| the IP and fingerprint attribute the action but grant nothing - so contexts | ||
| that take an attribution can pass it here unchanged. |
Contributor
There was a problem hiding this comment.
Suggested change
| `actor` may be `nil` for an anonymous visitor. It may also be a | |
| `Philomena.Attribution.Actor`: permissions are decided by its `user` alone - | |
| the IP and fingerprint attribute the action but grant nothing - so contexts | |
| that take an attribution can pass it here unchanged. | |
| `actor` may be `nil` for an anonymous visitor. It may also be a | |
| `Philomena.Attribution.Actor`, where permissions are decided by its `user` alone. |
Comment on lines
+332
to
+334
| An id that cannot name a row is `{:error, :not_found}`, while a well-formed id | ||
| that names no row authorizes `nil` - which no rule permits - and is | ||
| therefore `{:error, :unauthorized}`. |
Contributor
There was a problem hiding this comment.
Suggested change
| An id that cannot name a row is `{:error, :not_found}`, while a well-formed id | |
| that names no row authorizes `nil` - which no rule permits - and is | |
| therefore `{:error, :unauthorized}`. | |
| An id that cannot name a row is `{:error, :not_found}`. | |
| A well-formed id that names no row is `{:error, :unauthorized}`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Serves as an example of how work is expected to be done moving forward. During this, another bug was discovered, where deleting an anonymous tag change caused a crash. This is fixed here.
Fixes #600