Skip to content

Commit

Permalink
Merge pull request #5298 from neos/feature/3732-cr-privileges-v2
Browse files Browse the repository at this point in the history
!!! FEATURE: Content Repository Privileges
  • Loading branch information
kitsunet authored Nov 16, 2024
2 parents b1fc4e6 + 8768298 commit 725381d
Show file tree
Hide file tree
Showing 80 changed files with 2,350 additions and 861 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

namespace Neos\ContentRepository\BehavioralTests\TestSuite\Behavior;

use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphReadModelInterface;
use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId;
use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\Helpers\TestingAuthProvider;
use Neos\ContentRepositoryRegistry\Factory\AuthProvider\AuthProviderFactoryInterface;

final class TestingAuthProviderFactory implements AuthProviderFactoryInterface
{
public function build(ContentRepositoryId $contentRepositoryId, ContentGraphReadModelInterface $contentGraphReadModel): TestingAuthProvider
{
return new TestingAuthProvider();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Neos:
factoryObjectName: Neos\ContentRepository\BehavioralTests\TestSuite\Behavior\GherkinPyStringNodeBasedNodeTypeManagerFactory
contentDimensionSource:
factoryObjectName: Neos\ContentRepository\BehavioralTests\TestSuite\Behavior\GherkinTableNodeBasedContentDimensionSourceFactory
userIdProvider:
factoryObjectName: Neos\ContentRepositoryRegistry\Factory\UserIdProvider\StaticUserIdProviderFactory
authProvider:
factoryObjectName: Neos\ContentRepositoryRegistry\Factory\AuthProvider\StaticAuthProviderFactory
clock:
factoryObjectName: Neos\ContentRepositoryRegistry\Factory\Clock\SystemClockFactory
propertyConverters: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Neos:
ContentRepositoryRegistry:
presets:
default:
userIdProvider:
factoryObjectName: 'Neos\ContentRepository\BehavioralTests\TestSuite\Behavior\FakeUserIdProviderFactory'
authProvider:
factoryObjectName: 'Neos\ContentRepository\BehavioralTests\TestSuite\Behavior\TestingAuthProviderFactory'
clock:
factoryObjectName: 'Neos\ContentRepository\BehavioralTests\TestSuite\Behavior\FakeClockFactory'
nodeTypeManager:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Feature: Disable a node aggregate
And I expect node aggregate identifier "nody-mc-nodeface" and node path "document/child-document" to lead to node cs-identifier;nody-mc-nodeface;{}
And I expect this node to be a child of node cs-identifier;sir-david-nodenborough;{}

When VisibilityConstraints are set to "frontend"
When VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Feature: Disable a node aggregate
And I expect node aggregate identifier "nody-mc-nodeface" and node path "document/child-document" to lead to node cs-identifier;nody-mc-nodeface;{"language":"mul"}
And I expect this node to be a child of node cs-identifier;sir-david-nodenborough;{"language":"mul"}

When VisibilityConstraints are set to "frontend"
When VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -148,7 +148,7 @@ Feature: Disable a node aggregate

# Tests for the generalization
When I am in dimension space point {"language":"mul"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -195,7 +195,7 @@ Feature: Disable a node aggregate

# Tests for the virtual specialization
When I am in dimension space point {"language":"gsw"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -224,7 +224,7 @@ Feature: Disable a node aggregate

# Tests for the real specialization
When I am in dimension space point {"language":"ltz"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -253,7 +253,7 @@ Feature: Disable a node aggregate

# Tests for the peer variant
When I am in dimension space point {"language":"en"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -371,7 +371,7 @@ Feature: Disable a node aggregate
And I expect node aggregate identifier "nody-mc-nodeface" and node path "document/child-document" to lead to node cs-identifier;nody-mc-nodeface;{"language":"mul"}
And I expect this node to be a child of node cs-identifier;sir-david-nodenborough;{"language":"mul"}

When VisibilityConstraints are set to "frontend"
When VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -399,7 +399,7 @@ Feature: Disable a node aggregate

# Tests for the generalization
When I am in dimension space point {"language":"mul"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -428,7 +428,7 @@ Feature: Disable a node aggregate

# Tests for the virtual specialization
When I am in dimension space point {"language":"gsw"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -457,7 +457,7 @@ Feature: Disable a node aggregate

# Tests for the real specialization
When I am in dimension space point {"language":"ltz"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -486,7 +486,7 @@ Feature: Disable a node aggregate

# Tests for the peer variant
When I am in dimension space point {"language":"en"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Feature: Enable a node aggregate
And I expect this node aggregate to disable dimension space points []

When I am in workspace "live" and dimension space point {}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -143,7 +143,7 @@ Feature: Enable a node aggregate
And I expect this node aggregate to disable dimension space points [{}]

When I am in workspace "live" and dimension space point {}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -218,7 +218,7 @@ Feature: Enable a node aggregate
And I expect this node aggregate to disable dimension space points []

When I am in workspace "live" and dimension space point {}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Feature: Enable a node aggregate
And I expect node aggregate identifier "the-great-nodini" and node path "document/court-magician" to lead to node cs-identifier;the-great-nodini;{"language":"mul"}
And I expect this node to be a child of node cs-identifier;sir-david-nodenborough;{"language":"mul"}

When VisibilityConstraints are set to "frontend"
When VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -193,7 +193,7 @@ Feature: Enable a node aggregate

# Tests for the generalization
When I am in dimension space point {"language":"mul"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -223,7 +223,7 @@ Feature: Enable a node aggregate

# Tests for the virtual specialization
When I am in dimension space point {"language":"gsw"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -274,7 +274,7 @@ Feature: Enable a node aggregate

# Tests for the real specialization
When I am in dimension space point {"language":"ltz"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -325,7 +325,7 @@ Feature: Enable a node aggregate

# Tests for the peer variant
When I am in dimension space point {"language":"en"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -438,7 +438,7 @@ Feature: Enable a node aggregate
And I expect node aggregate identifier "the-great-nodini" and node path "document/court-magician" to lead to node cs-identifier;the-great-nodini;{"language":"mul"}
And I expect this node to be a child of node cs-identifier;sir-david-nodenborough;{"language":"mul"}

When VisibilityConstraints are set to "frontend"
When VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -488,7 +488,7 @@ Feature: Enable a node aggregate

# Tests for the generalization
When I am in dimension space point {"language":"mul"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -538,7 +538,7 @@ Feature: Enable a node aggregate

# Tests for the virtual specialization
When I am in dimension space point {"language":"gsw"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -589,7 +589,7 @@ Feature: Enable a node aggregate

# Tests for the real specialization
When I am in dimension space point {"language":"ltz"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -640,7 +640,7 @@ Feature: Enable a node aggregate

# Tests for the peer variant
When I am in dimension space point {"language":"en"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
| Name | NodeDiscriminator |
Expand Down Expand Up @@ -716,25 +716,25 @@ Feature: Enable a node aggregate
And I expect node aggregate identifier "the-great-nodini" and node path "document/court-magician" to lead to node cs-identifier;the-great-nodini;{"language":"mul"}
And I expect this node to be a child of node cs-identifier;sir-david-nodenborough;{"language":"mul"}

When VisibilityConstraints are set to "frontend"
When VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "the-great-nodini" and node path "document/court-magician" to lead to no node

# Tests for the generalization
When I am in dimension space point {"language":"mul"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "the-great-nodini" and node path "document/court-magician" to lead to no node

# Tests for the virtual specialization
When I am in dimension space point {"language":"gsw"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "the-great-nodini" and node path "document/court-magician" to lead to no node

# Tests for the real specialization
When I am in dimension space point {"language":"ltz"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "the-great-nodini" and node path "document/court-magician" to lead to no node

# Tests for the peer variant
When I am in dimension space point {"language":"en"}
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "the-great-nodini" and node path "document/court-magician" to lead to no node
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Feature: Creation of nodes underneath disabled nodes
| nodeAggregateId | "the-great-nodini" |
| sourceOrigin | {"language":"mul"} |
| targetOrigin | {"language":"ltz"} |
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"

Scenario: Create a new node with parent disabled with strategy allSpecializations
Given the command DisableNodeAggregate is executed with payload:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: Variation of hidden nodes
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.ContentRepository:Root" |
And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"

Scenario: Specialize a node where the specialization target is enabled
Given I am in dimension space point {"language":"de"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Feature: On forking a content stream, hidden nodes should be correctly copied as
| 1 | the-great-nodini |
| 2 | nodingers-cat |

And VisibilityConstraints are set to "frontend"
And VisibilityConstraints are set to "default"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node user-cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have no child nodes
And the subtree for node aggregate "lady-eleonode-rootford" with node types "" and 2 levels deep should be:
Expand Down
Loading

0 comments on commit 725381d

Please sign in to comment.