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

IBX-580: Added deleted location limitation role access scenario #1799

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

micszo
Copy link
Member

@micszo micszo commented Jul 12, 2021

Question Answer
Tickets IBX-580
Bug fix? no
New feature? no (new test case)
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

Test checking whether it is possible to access a role that has a policy with a location limitation pointing to a location that has been deleted.

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@micszo micszo marked this pull request as ready for review July 13, 2021 07:13
@micszo micszo changed the title [WIP] IBX-580: deleted location limitation role IBX-580: deleted location limitation role Jul 13, 2021
@micszo
Copy link
Member Author

micszo commented Jul 13, 2021

PR for 3.3: #1800

Copy link
Member

@mnocon mnocon left a comment

Choose a reason for hiding this comment

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

The whole Scenario is run as admin, maybe it should not be added to the personas suite and should in included in the Roles.feature file?

Something like:

    Given I create "folder" Content items in root in "eng-GB"
      | name            | short_name      |
      | DeletedLocation | DeletedLocation |
    And I create a role "DeletedLocationRole"
    And I add policy "content" "read" to "DeletedLocationRole" with limitations
      | limitationType | limitationValue  |
      | Location       | /DeletedLocation |
    And I send "/DeletedLocation" to the Trash
    When I am logged as "admin"
    And I go to "Roles" in "Admin" tab
    And I go to "DeletedLocationRole" "Role" page
    Then I should be on "Role" "DeletedLocationRole" page

should work and does not need to be split into two phases (setup & execution).

@micszo
Copy link
Member Author

micszo commented Jul 15, 2021

The whole Scenario is run as admin, maybe it should not be added to the personas suite and should in included in the Roles.feature file?

Something like:

    Given I create "folder" Content items in root in "eng-GB"
      | name            | short_name      |
      | DeletedLocation | DeletedLocation |
    And I create a role "DeletedLocationRole"
    And I add policy "content" "read" to "DeletedLocationRole" with limitations
      | limitationType | limitationValue  |
      | Location       | /DeletedLocation |
    And I send "/DeletedLocation" to the Trash
    When I am logged as "admin"
    And I go to "Roles" in "Admin" tab
    And I go to "DeletedLocationRole" "Role" page
    Then I should be on "Role" "DeletedLocationRole" page

should work and does not need to be split into two phases (setup & execution).

Applied in 3c577d8.

@micszo micszo requested a review from mnocon July 15, 2021 12:08
Copy link
Member

@mnocon mnocon left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@micszo
Copy link
Member Author

micszo commented Jul 15, 2021

PR to 3.3 (#1800) is now updated. Please have a look.

@micszo micszo changed the title IBX-580: deleted location limitation role IBX-580: Added deleted location limitation role access scenario Jul 16, 2021
@sonarcloud
Copy link

sonarcloud bot commented Jul 16, 2021

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
4.6% 4.6% Duplication

@mnocon mnocon merged commit dbd6621 into ezsystems:1.5 Jul 16, 2021
@micszo micszo deleted the ibx-580-del-loc-lim-role branch July 16, 2021 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants