mattermost/server/scripts
Jesse Hallam 462f34ac6c
Generate default_roles_permissions.js from a live server snapshot (#36698)
* Generate default_roles_permissions.js from a live server snapshot

Replace the hand-maintained default_roles_permissions.js with a
generated file. The generator (scripts/default_permissions_generator/)
boots a real app.NewServer() against a temporary database created by
storetest.MakeSqlSettings, lets all schema and app-level migrations run
naturally, then snapshots the resulting Roles table into the JS file.

This eliminates the drift risk of the previous hand-maintained map:
new migrations are picked up automatically because the same server
initialization path is used here as in production.

The CI job gets a postgres service and sets IS_CI=true so the generator
uses the same host-switching logic as the rest of the test suite.
Locally, make start-docker provides the postgres instance.

* Address CodeRabbit feedback: pin checkout SHA, add permissions, add .PHONY entries
2026-05-25 15:03:11 -03:00
..
config_generator MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
default_permissions_generator Generate default_roles_permissions.js from a live server snapshot (#36698) 2026-05-25 15:03:11 -03:00
esrupgrades Remove vestigial MySQL support (#34865) 2026-01-20 21:01:59 +00:00
testdata ci: shard server Postgres tests into 4 parallel runners (#35739) 2026-03-26 15:07:40 -04:00
diff-config.sh Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
diff-email-templates.sh Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
get_latest_release.sh Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
jq-dep-check.sh Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
ldap-check.sh Update ldap-check.sh (#31180) 2025-10-07 12:31:48 +02:00
mattermost-postgresql-5.0.0.sql Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
mattermost-postgresql-6.0.0.sql Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
mirror-docker-images.json Remove vestigial MySQL support (#34865) 2026-01-20 21:01:59 +00:00
mirror-docker-images.sh CLD-5698 - Add e2e smoketests (#23590) 2023-06-12 11:56:33 +02:00
prereq-check-enterprise.sh Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
psql-migration-test.sh Mono repo -> Master (#22553) 2023-03-22 17:22:27 -04:00
run-shard-tests.sh fix(ci): restore testname format in sharded gotestsum runs (#36078) 2026-04-14 15:13:39 -03:00
shard-split.js ci: invalidate poisoned shard-timing cache and guard future saves (#36568) 2026-05-14 16:01:49 +00:00
shard-split.test.js ci: shard server Postgres tests into 4 parallel runners (#35739) 2026-03-26 15:07:40 -04:00
vet-api-check.sh Update API docs (#36302) 2026-05-11 12:29:25 +02:00
wait-for-system-start.sh [MM-53840] Add migration workflow (#24211) 2023-08-16 10:09:11 +03:00