Skip to content

Conversation

@DiegoPino
Copy link
Member

See #510 and #497

@DiegoPino DiegoPino added Field Formatter The thing that glues the pieces and adds glitter Embargoes Heart Shaped boxes labels Apr 28, 2025
@DiegoPino DiegoPino added this to the 1.5.0 milestone Apr 28, 2025
@DiegoPino DiegoPino requested a review from alliomeria April 28, 2025 22:14
@DiegoPino DiegoPino self-assigned this Apr 28, 2025
@DiegoPino
Copy link
Member Author

@alliomeria not ready yet. But pretty advanced already. Will let you know when/how to test and to merge. Thanks

DiegoPino and others added 2 commits April 29, 2025 11:49
@DiegoPino
Copy link
Member Author

@alliomeria thanks for your edits! The wording looks very good. Really appreciate it.
I need to add now "views argument" validation so Embargo ADOs can effectively "block" a query made on e.g Children + the Viewer/Formatter settings that are missing. Will share that once done. Danke!

Allows ADO embargo to drive Argument validation on a View/Block (10/10!)
We need to statically cache as UUID and NID the results (in a single call) to avoid over processing. The reason we need the NID (and new method for that) is that at the View level, where we have our new Argument Validator, the argument is a NID .... Also.
When a View checks/validates the argument and e.g We find it is "FALSE", meaning the user can't bypass an embargo, basically no more processing happens and the View might return FALSE (not an render array). IN that case, no more "hooks" run and i can't longer alter the Cache tags/ max times and context. So the safest option for that is really, simply NOT cache at all.

It is one or the other: safety v/s speed. First one wins in the world of Bots/access restrictions.
Why?
We need the entity now, not just the UUID.
That way we can set 2 static caches, one via UUID and one via NID
@DiegoPino
Copy link
Member Author

@alliomeria Ok. This is working and tested on all parts we apply Embargoes. I still need the last pull to add to some viewers the Formatter settings form checkbox to hide in case of embargo. Once that is done (tomorrow 10AM) I will ask you to merge please. Night

@DiegoPino DiegoPino added the Drupal Views Ask and you should receive label Apr 30, 2025
@DiegoPino DiegoPino changed the title ISSUE-510: New embargo (global) options + synchronize Viewer settings + extras ISSUE-510: New embargo (global) options + ADO Argument validator for Views + Refactor embargo service May 1, 2025
@DiegoPino
Copy link
Member Author

@alliomeria I will merge and make another pull for the Formatter settings. My pulls/commit trail is getting too large

@DiegoPino DiegoPino merged commit be9f6e0 into 1.5.0 May 1, 2025
@DiegoPino DiegoPino deleted the ISSUE-510 branch July 24, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Drupal Views Ask and you should receive Embargoes Heart Shaped boxes Field Formatter The thing that glues the pieces and adds glitter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to 'Hide Viewer in presence of Embargo' Needed for Additional Viewers/Formatters Additional option/method for Embargo configuration

3 participants