Skip to content

Fix MM-67648 (and preserve MM-66249 fix)#2204

Merged
jgheithcock merged 3 commits intomasterfrom
MM-67648
Feb 20, 2026
Merged

Fix MM-67648 (and preserve MM-66249 fix)#2204
jgheithcock merged 3 commits intomasterfrom
MM-67648

Conversation

@jgheithcock
Copy link
Contributor

Summary

What was wrong with the fix for MM-667648

We only require that a user can post in a channel (and thus, that a channel is provided) to create a checklist. The prior code checked if the user had the run_create in the team. This isn't the default in production but was part of the test setup.

Why did this not get caught by our tests

The short answer is that our tests do not match the reality of what is default in production. The worse part is that neither Claude nor i can determine where this happens. We test that a member (aka 'team_user') has the run_create permission and, while it does not in the default system configs, it does in our test environment but we cannot find where that is happening. So, for these checklist specific tests, we remove run_create from the 'team_user' as well as supply an existing channel ID. This made it so that, without the fix in playbook_runs.go, the tests now fail, and with that fix, all tests in make test pass.

Ticket Link

https://mattermost.atlassian.net/browse/MM-67648

Checklist

  • Gated by experimental feature flag
  • Unit tests updated

We only require that a user can post in a channel (and thus, that a channel is provided) to create a checklist. The prior code checked if the user had the run_create in the team. This isn't the default in production but was part of the test setup. This also fixes a number of checklist specific tests to remove run_create from the 'team_user' as well as supply an existing channel ID.
if !h.pluginAPI.User.HasPermissionToTeam(userID, playbookRun.TeamID, model.PermissionRunCreate) {
return nil, errors.Wrap(app.ErrNoPermissions, "You do not have permission to create runs on this team")
// For checklists, verify a channel ID and verify user has permission to post in the channel below.
if playbookRun.ChannelID == "" {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if playbookRun.ChannelID == "" {
if channel == nil {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, done

@calebroseland calebroseland added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester Setup Cloud Test Server Setup a test server using Mattermost Cloud labels Feb 19, 2026
@mm-cloud-bot
Copy link

Plugin Spinwick PR #2204 🎉

Test server created!

Access here: https://playbooks-pr-2204-y3b3h.test.mattermost.cloud

Plugin Version Artifact
playbooks a707b33 Download

Installation ID: 4fmc8jfgst8jp89gy33d551jtc
Logs: Click here

Credentials: Posted securely in this Mattermost channel - Look for PR #2204

@jgheithcock jgheithcock enabled auto-merge (squash) February 20, 2026 16:36
@jgheithcock jgheithcock merged commit 78e721b into master Feb 20, 2026
24 of 25 checks passed
@jgheithcock jgheithcock deleted the MM-67648 branch February 20, 2026 16:47
@mattermost-build mattermost-build removed the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Feb 20, 2026
@mm-cloud-bot
Copy link

Test server destroyed

@mm-cloud-bot
Copy link

Plugin test server update attempted, but encountered an issue:

⚠️ Install Error: failed to install plugin via mmctl: failed with status code 500

The test server is still available. You can manually download and install the updated plugin using the artifact link below.

Updated with git commit b5dea93565b17fdb01d79f4cf35772fc9c2abb1d

Plugin Version Artifact
playbooks b5dea93 Download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants