-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
FEATURE: Soft removal subtree tag removed
#5463
Conversation
Allows for soft deletion and querying the node correctly within the projection while marked deleted.
okay just for reference: This change implements soft-removal as discussed here under "soft removal of nodes in the graph projection". With that we can solve the bug of not being able to interpret changes inside deleted hierarchies. Further it should also fixe the problem of having nodes moved out of a deleted tree part which is published: #5364. regarding the implementation: i would say that the change projection should no longer be able to handle the real
we could even think about (deprecating) and translating regarding the new policy: shouldn't the deleted condition will be hardcoded in the CR Auth Service so in Neos.Neos a subgraph is never fetched with deleted nodes?. For the workspace publishing service we could use the manual way of |
I guess we could do that, but wouldn't we need to offer some kind of migration for beta users? Or do we add a huge warning that people should publish/discard workspaces before updating to this?
Mmmm, I am happy to do it either way, deleted could indeed be hardcoded if we wanted. I guess any special use, say a trash can or so, can easily use the low level apis to access it.... Either way would be fine by me. |
Neos.ContentRepository.Core/Classes/Feature/SubtreeTagging/Dto/SubtreeTag.php
Outdated
Show resolved
Hide resolved
We dont make it a policy because no one should have "Neos.Neos:ContentRepository.ReadDeletedNodes" granted
with the soft deletion - by tagging a node `deleted` - actual node deletions via (NodeAggregateWasRemoved) inside a non-live workspace are not desired in Neos if we publish a site we will include real removals like that in the publish or discard operation to prevent the change from being orphaned. Note that the site might not necessarily be the site where the change was made in multisite environments, but we cannot determine the hierarchy for removed nodes and edges.
because nodes are just tagged deleted we can still find them and their ancestors via the subgraph
okay i got rid of the removal attachment point flag now and also tested it in combination with the neos ui change and the ui e2e tests are fine as well left open points:
|
https://github.com/neos/neos-development-collection/pull/5463/files#diff-7afd4d9a8fcb7259c9136da8cba0e3b5b84fab7f01043a9a3c5ab54c881efc54R233 Should've taken care of the workspace ui problem? I saw that as well and after adjusting this here so that changes are marked as deleted it showed up as deleted in the workspace UI. |
ok the link doesn't work, but it's in the ChangeProjectino where a if $event->tag == deleted results in a deleted change |
this aligns more to our wording in `NodeAggregateWasRemoved` and we used generally the term 'remove' in neos 9
Regarding
Aside from many constraint checks and write site parts in the core (where the use of These are the other cases i found:
|
via the neos auth provider we will see disabled nodes in the backed (because its enabled for editor roles) but not the `removed` nodes which is correct. The restricted subtree tags are: array(1) { [0]=> string(7) "removed" }
removed
Todos as we discussed in the weekly last Friday:
further things, bernhard checked all handlers for
Also we still have these cases to adjust where we now want to avoid having removed nodes shown up
|
The removed tagging is NOT a core concern, and thus we create a dedicated factory similar to our `ContentStreamEventStreamName` factory.
and move logic out of `ContentRepositoryAuthorizationService` agian
…reateEmpty()` We had the discussion again how to name an empty object and for normal collections we used `createEmpty()` in the past and should continue to do so. The use of `none()` snuck in lately via the subscription engine. neos#5463 (comment)
After the discussion https://neos-project.slack.com/archives/C04PYL8H3/p1741197705659749?thread_ts=1741193962.566189&cid=C04PYL8H3 We concluded that `without` is misleading and normally used either way for immutable object member methods.
The method is relatively new from beta 16 and seldom used: neos@14c9f84 to be au pair to `NeosVisibilityConstraints::excludeDisabled` Also we had the discussion that the naming neos#5463 (comment) "TagConstraints" is confusing because there is no such value object. Funnily this reverts neos@f1c66a3 which was just a wip.
And deprecate `SubtreeTag::disabled` see discussion in neos#5463 (comment) The only behavioural change is that with that the content repository does not know any subtree tag by default and thus the new default of the `StaticAuthProvider::getVisibilityConstraints` is to have nothing excluded!
The method is relatively new from beta 16 and seldom used: neos/neos-development-collection@14c9f84 to be au pair to `NeosVisibilityConstraints::excludeDisabled` Also we had the discussion that the naming neos/neos-development-collection#5463 (comment) "TagConstraints" is confusing because there is no such value object. Funnily this reverts neos/neos-development-collection@9372b79 which was just a wip.
The method is relatively new from beta 16 and seldom used: neos/neos-development-collection@f3bc82e to be au pair to `NeosVisibilityConstraints::excludeDisabled` Also we had the discussion that the naming neos/neos-development-collection#5463 (comment) "TagConstraints" is confusing because there is no such value object. Funnily this reverts neos/neos-development-collection@702839d which was just a wip.
And deprecate `SubtreeTag::disabled` see discussion in neos/neos-development-collection#5463 (comment) The only behavioural change is that with that the content repository does not know any subtree tag by default and thus the new default of the `StaticAuthProvider::getVisibilityConstraints` is to have nothing excluded!
And deprecate `SubtreeTag::disabled` see discussion in neos/neos-development-collection#5463 (comment) The only behavioural change is that with that the content repository does not know any subtree tag by default and thus the new default of the `StaticAuthProvider::getVisibilityConstraints` is to have nothing excluded!
The method is relatively new from beta 16 and seldom used: neos/neos-development-collection@14c9f84 to be au pair to `NeosVisibilityConstraints::excludeDisabled` Also we had the discussion that the naming neos/neos-development-collection#5463 (comment) "TagConstraints" is confusing because there is no such value object. Funnily this reverts neos/neos-development-collection@f1c66a3 which was just a wip.
And deprecate `SubtreeTag::disabled` see discussion in neos/neos-development-collection#5463 (comment) The only behavioural change is that with that the content repository does not know any subtree tag by default and thus the new default of the `StaticAuthProvider::getVisibilityConstraints` is to have nothing excluded!
The method is relatively new from beta 16 and seldom used: neos/neos-development-collection@4a230cc to be au pair to `NeosVisibilityConstraints::excludeDisabled` Also we had the discussion that the naming neos/neos-development-collection#5463 (comment) "TagConstraints" is confusing because there is no such value object. Funnily this reverts neos/neos-development-collection@f1c66a3 which was just a wip.
And deprecate `SubtreeTag::disabled` see discussion in neos/neos-development-collection#5463 (comment) The only behavioural change is that with that the content repository does not know any subtree tag by default and thus the new default of the `StaticAuthProvider::getVisibilityConstraints` is to have nothing excluded!
And deprecate `SubtreeTag::disabled` see discussion in neos/neos-development-collection#5463 (comment) The only behavioural change is that with that the content repository does not know any subtree tag by default and thus the new default of the `StaticAuthProvider::getVisibilityConstraints` is to have nothing excluded!
And deprecate `SubtreeTag::disabled` see discussion in neos/neos-development-collection#5463 (comment) The only behavioural change is that with that the content repository does not know any subtree tag by default and thus the new default of the `StaticAuthProvider::getVisibilityConstraints` is to have nothing excluded!
neos#5463 deprecated parts from the `VisibilityConstraints`
…reateEmpty()` We had the discussion again how to name an empty object and for normal collections we used `createEmpty()` in the past and should continue to do so. The use of `none()` snuck in lately via the subscription engine. neos/neos-development-collection#5463 (comment)
…reateEmpty()` We had the discussion again how to name an empty object and for normal collections we used `createEmpty()` in the past and should continue to do so. The use of `none()` snuck in lately via the subscription engine. neos/neos-development-collection#5463 (comment)
Allows for soft deletion and querying the node correctly within the projection while marked deleted.
This change implements soft-removal as discussed #5459 (comment) under "soft removal of nodes in the graph projection". With that we can solve the #4997 of not being able to interpret changes inside deleted hierarchies. Further it should also fixe the problem of having nodes moved out of a deleted tree part which is published: #5364.