Skip to content

Commit

Permalink
Add test case for non channel admin accessing post links (#163)
Browse files Browse the repository at this point in the history
* add test case for non channel admin accessing post links
  • Loading branch information
yasserfaraazkhan authored Feb 7, 2024
1 parent 39496ec commit 443d29e
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/key-and-path.json
Original file line number Diff line number Diff line change
Expand Up @@ -6133,5 +6133,6 @@
{ "key": "MM-T5522", "path": "suite/system-console/user-management/new-ui", "id": 133258558 },
{ "key": "MM-T5523", "path": "suite/system-console/user-management/new-ui", "id": 133258559 },
{ "key": "MM-T5524", "path": "suite/system-console/user-management/new-ui", "id": 133258560 },
{ "key": "MM-T5525", "path": "suite/system-console/user-management/new-ui", "id": 133258561 }
{ "key": "MM-T5525", "path": "suite/system-console/user-management/new-ui", "id": 133258561 },
{ "key": "MM-T5526", "path": "channels/permalink-preview", "id": 133461976 }
]
1 change: 1 addition & 0 deletions data/test-by-folder.json
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@
"tests": [
"DM Permalink preview",
"GM Permalink preview",
"Non-channel-admin users can use message links in private channels",
"Permalink Preview - Compliance Export",
"Permalink Preview - DM permalink to public/private channel",
"Permalink Preview - DM’s",
Expand Down
4 changes: 4 additions & 0 deletions data/test-cases-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4582,6 +4582,10 @@
{
"name": "Permalink Preview - Nested Preview",
"file": "channels/permalink-preview/MM-T5091.md"
},
{
"name": "Non-channel-admin users can use message links in private channels",
"file": "channels/permalink-preview/MM-T5526.md"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions data/test-cases-slugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,7 @@
"channels/permalink-preview/mm-t5089",
"channels/permalink-preview/mm-t5090",
"channels/permalink-preview/mm-t5091",
"channels/permalink-preview/mm-t5526",
"channels/profile-settings/mm-t1283",
"channels/profile-settings/mm-t2042",
"channels/profile-settings/mm-t2043",
Expand Down
4 changes: 4 additions & 0 deletions data/test-cases-toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13804,6 +13804,10 @@
"name": "Permalink Preview - Short Text - Hover Post",
"slug": "channels/permalink-preview/mm-t4302"
},
"channels/permalink-preview/mm-t5526": {
"name": "Non-channel-admin users can use message links in private channels",
"slug": "channels/permalink-preview/mm-t5526"
},
"channels/permalink-preview/mm-t4326": {
"name": "Permalink Preview - DM permalink to public/private channel",
"slug": "channels/permalink-preview/mm-t4326"
Expand Down
59 changes: 59 additions & 0 deletions data/test-cases/channels/permalink-preview/MM-T5526.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
# (Required) Ensure all values are filled up
name: "Non-channel-admin users can use message links in private channels"
status: Active
priority: Normal
folder: Permalink Preview
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)

# (Optional)
location: null
component: null
tags: []
labels: []
tested_by_contributor: ""

# (Optional) Test type and tools
cypress: null
detox: null
mmctl: null
playwright: null
rainforest: []
manual_test_environments: []

# Do not change
id: 133461976
key: MM-T5526
created_on: "2024-02-07T09:00:33Z"
last_updated: "2024-02-07T14:30:32Z"
case_hashed: 425a66871c5d7014e897222c287b47c186d090e573b2075302e8477d9171298bbb31fbfdc7ebcf87823fc9833ffdbd71
steps_hashed: 79f1408d7f9bac8928e8ba936e65c515f5eb7201dfaea751a3e50d355100d93fd1a7f80fc74cd185c799380601fb1be8
---

<!-- (Auto-generated) Based on frontmatter's "key" and "name" -->

## MM-T5526: Non-channel-admin users can use message links in private channels

---

**Step 1**

Preconditions:

1. Ensure that the Mattermost instance is accessible.
2. Make sure normal users do not have permissions to manage private channel members.
3. Have at least two users available: one as the channel admin and another as a member without admin privileges.

Test Steps:

1. Create a private channel with the channel admin user.
2. Type a message in the private channel using the channel admin user.
3. Select the message posted by the channel admin user and use the "Copy Link" option.
4. Paste the copied link in the same private channel.
5. Add another user (non-admin) to the private channel with member permissions.
6. Log into Mattermost with newly added user's account.
7. Navigate to the channel and click on the message link.
8. Verify that the non-admin user can access the message by clicking on the link without encountering any errors.

0 comments on commit 443d29e

Please sign in to comment.