Commit graph

6274 commits

Author SHA1 Message Date
f7cfc9d35d feat(spaces): reject power level changes that conflict with space roles
Checks proposed m.room.power_levels events against Space-granted power
levels. Rejects if any user's proposed PL is below their Space role PL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:58:12 +01:00
9eb2d2542a chore(spaces): fix unused variable warning in append hook
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:56:24 +01:00
673813f5ae feat(spaces): add admin commands for space role management
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:55:37 +01:00
c8f39ca6ff feat(spaces): add default roles init and startup cache rebuild
Add ensure_default_roles() to check if a Space has m.space.roles state
event and create default admin/mod roles if missing. Add worker() to
rebuild the space roles cache on startup by iterating all rooms and
populating cache for spaces.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:52:10 +01:00
e3a0ab2214 feat(spaces): hook state event changes for role cache invalidation
Updates the space roles cache when m.space.roles, m.space.role.member,
or m.space.role.room state events are appended. Adds roles service as
a dependency of the timeline service.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:48:20 +01:00
0a52a928dc test(spaces): add comprehensive unit and integration tests
- 12 event content type serde tests (all pass)
- Service lookup unit tests (power level calc, role qualification)
- Enforcement scenario integration tests (access lifecycle, cross-space isolation)
- Cache consistency tests (populate, invalidate, clear)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 09:27:22 +01:00
f143248636 feat(spaces): add power level sync, auto-join, and auto-kick methods
- sync_power_levels(): Overrides child room PLs with Space role PLs
- auto_join_qualifying_rooms(): Joins user to all rooms they qualify for
- kick_unqualified_from_rooms(): Kicks user from rooms they no longer qualify for
- Adds globals dep for server_user access

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:13:59 +01:00
dfa38a1b49 feat(spaces): add role-based join gating for space child rooms
Checks if user has required Space roles before allowing join to a
child room. Runs after antispam checks, before the actual join path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:13:25 +01:00
83eea18f3e feat(spaces): add cache population and lookup methods for space roles
Adds is_enabled(), populate_space(), get_user_power_level(),
user_qualifies_for_room(), and get_parent_space() methods.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:03:47 +01:00
aae610b3d2 fix(spaces): use RoleDefinition from core instead of local duplicate
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 16:56:11 +01:00
053bdf00da feat(spaces): add space roles service for permission cascading
Create rooms::roles::Service with in-memory caches for role definitions,
user-role assignments, room requirements, and room-to-space mappings.
Register the service in the service stack alongside other room services.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 16:54:19 +01:00
c5ffc4963c feat(spaces): add custom state event types for space roles
Define serde content types for m.space.roles, m.space.role.member,
and m.space.role.room custom state events used by space permission
cascading.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 16:45:50 +01:00
dc8949f4d1 feat(spaces): add space_permission_cascading config flag
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 16:40:44 +01:00
84f6903c98 docs: expand implementation plan with comprehensive testing
Adds 5 new testing tasks (14-18):
- Task 14: Event content type edge case unit tests
- Task 15: Service lookup logic unit tests
- Task 16: Admin command parsing tests
- Task 17: Enforcement scenario integration tests
- Task 18: Cache consistency integration tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 16:35:31 +01:00
3bfd10efab docs: add implementation plan for space permission cascading
15-task plan covering config flag, custom event types, service layer,
cache, enforcement hooks, admin commands, and testing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:04:32 +01:00
835d434d92 docs: add design doc for space permission cascading
Covers power level cascading from Spaces to child rooms, role-based
room access control, continuous enforcement, and admin room commands.
Feature will be behind a server-wide config flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 14:59:48 +01:00
theS1LV3R
3121229707 docs: Update docker documentation to add /sbin/conduwuit to examples
These will likely have to be updated when !1485 goes through.

Fixes: !1529
2026-03-15 00:21:37 +00:00
Shane Jaroch
ff85145ee8
fix: missing logic inversion for acquired keys (should speed up room joins) 2026-03-13 20:54:38 -04:00
lveneris
f61d1a11e0 chore: set correct commit types for all renovate PRs 2026-03-09 21:51:21 +00:00
lveneris
11ba8979ff chore: batch non-major non-zerover cargo renovate PRs 2026-03-09 21:51:21 +00:00
Ginger
f6956ccf12 fix: Nuke all remaining references to MSC3575 in docs and code 2026-03-09 17:11:19 +00:00
Kimiblock Moe
977a5ac8c1 Enable the reloading of systemd credentials
systemd v260 has introduced a new option: RefreshOnReload, of which when set to true automatically reloads all confext and credential files. This should eliminate the full restart requirement to reload a changed configuration.
2026-03-09 16:08:47 +00:00
timedout
906c3df953 style: Reduce migration warning verbosity to info
They aren't actually warning of anything
2026-03-09 13:30:24 +00:00
timedout
33e5fdc16f style: Reduce verbosity of fix_corrupt_msc4133_fields 2026-03-09 13:30:24 +00:00
timedout
77ac17855a fix: Don't fail on invalid stripped state entries during migration 2026-03-09 13:30:24 +00:00
timedout
65ffcd2884 perf: Insert missed migration markers into fresh databases 2026-03-09 13:30:24 +00:00
timedout
7ec88bdbfe feat: Make noise about migrations and make errors more informative 2026-03-09 13:30:24 +00:00
Ginger
da3fac8cb4 fix: Use more robust check for max_request_size 2026-03-09 13:27:39 +00:00
Trash Panda
3366113939 fix: Retrieve content_type and video width/height 2026-03-09 13:27:39 +00:00
Trash Panda
9039784f41 fix: Clippy lints 2026-03-09 13:27:39 +00:00
Trash Panda
7f165e5bbe fix: Refactor and block media downloads larger than max_request_size 2026-03-09 13:27:39 +00:00
Trash Panda
c97111e3ca fix: Update example config 2026-03-09 13:27:39 +00:00
Trash Panda
e8746760fa feat(url-preview): Optionally download audio/video files for url preview requests 2026-03-09 13:27:39 +00:00
Katie Kloss
9dbd75e740 docs: Update FreeBSD instructions 2026-03-09 13:26:57 +00:00
Renovate Bot
85b2fd91b9 chore(deps): update rust crate serde-saphyr to 0.0.21 2026-03-09 13:26:23 +00:00
Renovate Bot
6420c218a9 chore(deps): update node-patch-updates to v2.0.5 2026-03-09 12:59:58 +00:00
Renovate Bot
ec9402a328 chore(deps): update github-actions-non-major 2026-03-09 12:32:58 +00:00
Renovate Bot
d01f06a5c2 chore(deps): lock file maintenance 2026-03-09 12:32:42 +00:00
Renovate Bot
aee51b3b0d chore(deps): update docker/setup-buildx-action action to v4 2026-03-08 14:52:50 +00:00
Renovate Bot
afcbccd9dd chore(deps): update ghcr.io/renovatebot/renovate docker tag to v43 2026-03-08 13:10:56 +00:00
Renovate Bot
02448000f9 chore(deps): update dependency cargo-bins/cargo-binstall to v1.17.7 2026-03-08 12:43:37 +00:00
Renovate Bot
6af8918aa8 chore(deps): update docker/login-action action to v4 2026-03-08 12:43:26 +00:00
Renovate Bot
08f83cc438 chore(deps): update docker/build-push-action action to v7 2026-03-08 12:43:04 +00:00
Renovate Bot
a0468db121 chore(deps): update docker/metadata-action action to v6 2026-03-08 05:03:55 +00:00
Tom Foster
4f23d566ed docs(docker): Restructure deployment guide and add env var reference
Add Quick Run section with complete getting-started workflow including
admin user creation via --execute flag. Consolidate Docker Compose to
treat reverse proxy as essential with Traefik/Caddy/nginx examples.

Move detailed image building to development guide, keeping deployment
docs focused on using pre-built images.

Create environment variables reference with practical examples and
context. Clarify built-in TLS is for testing only; production should
use reverse proxies.
2026-03-07 18:28:47 +00:00
Ginger
dac619b5f8
fix: Lower "timeline for newly joined room is empty" to debug_warn
Reviewed-by: nex <me@nexy7574.co.uk>
2026-03-07 11:56:15 -05:00
stratself
fdc9cc8074 docs: small refactor of the troubleshooting page
* rename "Continuwuity and Matrix issues" to just "Continuwuity issues"
* move "Config not applying" subsection to C10y issues section
* rename "General potential issues" to just "DNS issues" - this section
  will be elaborated later in a DNS tuning page
2026-03-06 16:35:11 +00:00
timedout
40b1dabcca
chore: Add news fragment 2026-03-06 14:32:13 +00:00
timedout
94c5af40cf
fix: Automatically remove corrupted appservice registrations 2026-03-06 14:21:04 +00:00
Renovate Bot
36a3144757 chore(deps): update rust crate tokio to v1.50.0 2026-03-05 13:33:32 +00:00