|
| 1 | +@seeded-role-matrix |
| 2 | +Feature: Seeded role matrix private page permissions |
| 3 | + The rm0521 role-matrix fixture already exists in the local AppFlowy Cloud database. |
| 4 | + These scenarios verify the web UI behavior for owner, member, guests, and nonmember accounts. |
| 5 | + |
| 6 | + Background: |
| 7 | + Given the seeded rm0521 role matrix fixture exists |
| 8 | + |
| 9 | + # Expected result: a private page shared to a guest only lists the owner and that guest. |
| 10 | + # Workspace co-owners, members, other guests, and nonmembers must not appear as inherited full-access users. |
| 11 | + Scenario: Owner private page share panel only lists explicit guest access |
| 12 | + Given I sign in as seeded "owner" |
| 13 | + When I open the seeded "owner guest read private page" |
| 14 | + And I open the share panel |
| 15 | + Then the share panel shows seeded "owner" with "Full access" |
| 16 | + And the share panel shows seeded "guest reader" with "Can view" |
| 17 | + And the share panel does not show seeded "co-owner" |
| 18 | + And the share panel does not show seeded "member" |
| 19 | + And the share panel does not show seeded "guest writer" |
| 20 | + And the share panel does not show seeded "guest no share" |
| 21 | + And the share panel does not show seeded "nonmember" |
| 22 | + And the share panel general access is "Restricted" |
| 23 | + |
| 24 | + # Expected result: a private page shared to a workspace member lists that member with edit access, |
| 25 | + # without leaking other workspace members or guests into the people-with-access list. |
| 26 | + Scenario: Owner private page share panel lists explicit member access |
| 27 | + Given I sign in as seeded "owner" |
| 28 | + When I open the seeded "owner member write private page" |
| 29 | + And I open the share panel |
| 30 | + Then the share panel shows seeded "owner" with "Full access" |
| 31 | + And the share panel shows seeded "member" with "Can edit" |
| 32 | + And the share panel does not show seeded "co-owner" |
| 33 | + And the share panel does not show seeded "guest reader" |
| 34 | + And the share panel does not show seeded "guest writer" |
| 35 | + And the share panel does not show seeded "guest no share" |
| 36 | + And the share panel does not show seeded "nonmember" |
| 37 | + And the share panel general access is "Restricted" |
| 38 | + |
| 39 | + # Expected result: a read-only guest can open the explicitly shared private page, |
| 40 | + # sees restricted general access, and cannot edit the page title. |
| 41 | + Scenario: Guest reader can open the shared private page but cannot edit the title |
| 42 | + Given I sign in as seeded "guest reader" |
| 43 | + When I open the seeded "owner guest read private page" |
| 44 | + Then the seeded page title is visible |
| 45 | + And the page title is read-only |
| 46 | + When I open the share panel |
| 47 | + Then the share panel shows seeded "guest reader" with "Can view" |
| 48 | + And the share panel general access is "Restricted" |
| 49 | + |
| 50 | + # Expected result: a write guest can open and rename the explicitly shared private page. |
| 51 | + Scenario: Guest writer can open and rename the shared private page |
| 52 | + Given I sign in as seeded "guest writer" |
| 53 | + When I open the seeded "owner guest write private page" |
| 54 | + Then the seeded page title is visible |
| 55 | + And the page title is editable |
| 56 | + When I rename the page title to "rm0521 Writer BDD Rename Probe Private Page" |
| 57 | + Then the page title is "rm0521 Writer BDD Rename Probe Private Page" |
| 58 | + |
| 59 | + # Expected result: a workspace co-owner does not inherit access to another user's unshared private page. |
| 60 | + Scenario: Co-owner cannot open the owner's unshared private page |
| 61 | + Given I sign in as seeded "co-owner" |
| 62 | + When I open the seeded "owner unshared private page" |
| 63 | + Then the no access page is shown |
| 64 | + |
| 65 | + # Expected result: a normal workspace member does not inherit access to another user's unshared private page. |
| 66 | + Scenario: Member cannot open the owner's unshared private page |
| 67 | + Given I sign in as seeded "member" |
| 68 | + When I open the seeded "owner unshared private page" |
| 69 | + Then the no access page is shown |
| 70 | + |
| 71 | + # Expected result: a workspace member can open and edit a private page explicitly shared to them. |
| 72 | + Scenario: Member can open the owner private page explicitly shared to them |
| 73 | + Given I sign in as seeded "member" |
| 74 | + When I open the seeded "owner member write private page" |
| 75 | + Then the seeded page title is visible |
| 76 | + And the page title is editable |
| 77 | + |
| 78 | + # Expected result: a workspace member can open a page in a public space while it is public. |
| 79 | + # After the owner changes that space to Private in the web UI, the same member loses access to |
| 80 | + # the page and sees the no-access screen instead of the private-space content. |
| 81 | + Scenario: Member loses access when a public space becomes private |
| 82 | + Given I sign in as seeded "owner" |
| 83 | + And I create a temporary public space page in the seeded workspace |
| 84 | + When I open the temporary seeded page |
| 85 | + Then the temporary seeded page title is visible |
| 86 | + When I sign in as seeded "member" |
| 87 | + And I open the temporary seeded page |
| 88 | + Then the temporary seeded page title is visible |
| 89 | + When I sign in as seeded "owner" |
| 90 | + And I change the temporary seeded space permission to "Private" |
| 91 | + And I sign in as seeded "member" |
| 92 | + And I open the temporary seeded page |
| 93 | + Then the no access page is shown |
| 94 | + And the temporary seeded space is hidden from the sidebar |
| 95 | + And the temporary seeded page editor is not visible |
| 96 | + |
| 97 | + # Expected result: a guest with no explicit share cannot open workspace pages or another guest's shared private page. |
| 98 | + Scenario: Guest with no page share cannot open seeded pages |
| 99 | + Given I sign in as seeded "guest no share" |
| 100 | + When I open the seeded "public page" |
| 101 | + Then the no access page is shown |
| 102 | + And the seeded page title is not visible |
| 103 | + When I open the seeded "owner guest read private page" |
| 104 | + Then the no access page is shown |
| 105 | + |
| 106 | + # Expected result: a user outside the workspace cannot open the seeded workspace public page. |
| 107 | + Scenario: Nonmember cannot open the workspace public page |
| 108 | + Given I sign in as seeded "nonmember" |
| 109 | + When I open the seeded "public page" |
| 110 | + Then the no access page is shown |
| 111 | + And the seeded page title is not visible |
0 commit comments