Commit Graph
9 Commits
Author SHA1 Message Date
ancsemi 09ddf5e61e Turn level-based permissions into ticks and retire the hidden rule 2026-10-16 23:19:52 -04:00
ancsemi 229ca512e2 Template unit test: a temp folder Windows still holds no longer fails the test file 2026-10-06 20:02:07 -04:00
ancsemi 4eac343574 When a server template creates or changes roles, members online who hold them get their new permissions straight away, the same way editing a role in Settings pushes them; the role refresh helpers now live in roleRefresh.js so both paths share them (#5732) 2026-10-05 18:44:29 -04:00
ancsemi 88244097f5 Server template imports now keep emojis and stickers within the server's size limits, copy only the images the template uses, and are refused when the server is low on disk space, like uploads (#5732) 2026-10-05 18:44:19 -04:00
ancsemi 9c723cc9ea Exporting a server template now tidies names and values saved under older rules (channel and role names, categories, webhook and post author names, forum layouts, link rules, emoji names, role menus) and keeps within the import's size limits, so a file exported from any server can be imported again (#5732) 2026-10-05 18:44:19 -04:00
ancsemi 69632ed668 Role menus from a server template are now posted with the standard menu text instead of text from the file, so a template cannot post its own words under the admin's name, and their emojis follow the same rules as a menu posted by hand (#5732) 2026-10-05 18:44:19 -04:00
ancsemi b31a759b2b Server templates can no longer hand out power through roles: admin-only permissions are left out of imported roles, the Admin role is never exported or changed, and a role that carries more than the Member role has is not given to new members, offered on a role menu or given to everyone who joins a channel; Replace layout leaves such roles as they are (#5732) 2026-10-05 18:44:19 -04:00
ancsemi 695d9c89fa Server templates can no longer set level thresholds for admin-only permissions, so an imported file cannot hand every member powers like transfer_admin or manage_server; the admin's own thresholds for those stay as they are (#5732) 2026-10-05 18:44:19 -04:00
Amnibroandancsemi 662534f976 Server templates: export a server's branding, categories, channels, roles and setup posts as one file, and import one from Settings or tools/template.js (#5732)
Admins download the template under Settings > Admin > Server Template, and import
one with a preview of what it will create or update. Add missing leaves existing
channels, roles and settings alone; Replace layout updates them to match. Neither
mode deletes anything. Members, messages, DMs, keys, invite and channel codes,
webhook tokens and secret settings are never exported. Settings go through an
allowlist, and imports are validated strictly: sizes, names, references, image
types and checksums.

The channel-name rule, built-in theme list, automod word and escalation checks
and image sniffing now each live in one place, since the template code shares
them.

Co-authored-by: ancsemi <ancsemi@gmail.com>
2026-10-05 18:00:22 -04:00