Skip to content

Rooms, Permissions, and Preferences

SyncTV has two role layers. Keep them separate.

LayerRolesScope
Global user roleroot, admin, userPlatform administration, user management, room management, system settings
Room rolecreator, admin, member, guestPlayback, members, media, chat, and settings inside one room

A global admin is not automatically a room admin. A room admin is not a platform administrator.

RoleBoundary
rootSuper administrator; can manage root/admin/user accounts, global settings, and all rooms
adminPlatform administrator; can manage normal users and rooms, but cannot modify root or equally privileged admins
userNormal user; uses rooms and media features according to business permissions

User status is derived from ban records:

StatusEffect
activeCan log in, create rooms, and join rooms
bannedCannot log in, create rooms, or join rooms
Room roleDefault meaning
creatorRoom creator; has all room permissions and cannot be weakened by room settings
adminRoom administrator; can manage members, playback, media, room settings, and moderation by default
memberNormal member; can chat, add/edit/delete own media, and view playlist/member/chat data by default
guestRead-only guest; can view playlist by default

Room roles provide base permissions. Room settings and member overrides then add or remove permissions.

Effective permissions are evaluated in three layers:

global role default permissions
-> room settings added/removed permissions
-> member-specific added/removed permissions

Rules:

  • creator always has all room permissions.
  • Add is applied before remove. If the same bit is both added and removed, remove wins.
  • member_added_permissions cannot exceed the admin-level ceiling.
  • guest_added_permissions cannot exceed the member-level ceiling.
  • DELETE_ROOM is not a room-delegable permission. Room deletion belongs to the creator or the platform management plane.
PermissionMeaning
SEND_CHATSend chat and danmaku messages
ADD_MEDIAAdd media
DELETE_MEDIA_SELF / DELETE_MEDIA_ANYDelete own media / delete any media
EDIT_MEDIA_SELF / EDIT_MEDIA_ANYEdit own media / edit any media
REORDER_PLAYLISTReorder playlist
CLEAR_PLAYLISTClear playlist
START_LIVEStart livestream publishing
PLAY_CONTROLPlay, pause, and seek
CHANGE_CURRENT_MEDIASwitch current media
CHANGE_PLAYBACK_RATEChange playback speed
APPROVE_MEMBERApprove or reject join requests
KICK_MEMBERKick members
BAN_MEMBERBan or unban members
SET_MEMBER_PERMISSIONSChange member permissions
ADD_MEMBERAdd members directly
SET_ROOM_SETTINGSModify room settings
DELETE_CHATDelete chat messages
DELETE_ROOMDelete room; not a normal room-delegable permission
VIEW_PLAYLISTView playlist
VIEW_MEMBER_LISTView member list
VIEW_CHAT_HISTORYView chat history
USE_WEBRTCUse WebRTC voice/video features

Permission values are usually represented as u64 bitmasks in APIs and CLI commands. Before changing a bitmask, confirm target role and current effective permissions.

Room settings control join policy, room features, and default permissions.

SettingDefaultMeaning
require_passwordfalseRequire room password
allow_guest_joinfalseAllow guests to join
max_members100Maximum members; upper bound 10000
require_approvalfalseRequire join approval
allow_auto_jointrueAllow eligible users to auto-join
chat_enabledtrueEnable chat
danmaku_enabledtrueEnable danmaku
auto_play{}Auto-play policy JSON
admin_added_permissions / admin_removed_permissions0Admin default permission changes
member_added_permissions / member_removed_permissions0Member default permission changes
guest_added_permissions / guest_removed_permissions0Guest default permission changes

Example:

Terminal window
synctv room settings get <ROOM_ID>
synctv room settings update <ROOM_ID> --settings-json '{"require_approval":true}'

Member overrides are for exceptions, such as muting one member, granting playback control to one member, or removing ban capability from one administrator.

Semantics:

  • Base permissions come from the room role.
  • added_permissions adds normal member permissions.
  • removed_permissions removes normal member permissions.
  • Administrators can also have admin_added_permissions and admin_removed_permissions.
  • Weakening creator permissions has no effect.

Guidance:

  • Use roles for long-term permission design and member overrides for exceptions.
  • Too many overrides make troubleshooting harder; clean up stale overrides.
  • When removing administrator privileges, consider changing the role instead of stacking many deny bits.

User preferences are database-backed user-level settings, not YAML configuration.

FieldDefaultMeaning
two_factor_enabledfalseUser-level 2FA
notifications.room_invitation_in_apptrueIn-app room invitation notifications
notifications.room_event_in_apptrueIn-app room event notifications
notifications.system_announcement_in_apptrueIn-app system announcements
notifications.room_invitation_emailfalseEmail room invitation notifications
notifications.room_event_emailfalseEmail room event notifications
notifications.system_announcement_emailtrueEmail system announcements
provider_defaults.alist_instance_namenullDefault Alist instance
provider_defaults.emby_instance_namenullDefault Emby instance
provider_defaults.bilibili_instance_namenullDefault Bilibili instance

The database table also has a settings JSONB extension payload for low-priority experimental preferences. Stable product preferences should use explicit columns. Do not store secrets, tokens, cookies, passwords, or provider credentials in it.

2FA constraints:

  • Enabling 2FA requires at least two local methods: password, WebAuthn/passkey, verified email.
  • OAuth2 is not counted as a local 2FA factor, but 2FA-enabled users may log in with OAuth2.
  • Removing an authentication method while 2FA is enabled must still leave at least two usable local methods.

Avoid Raw Bitmasks

Prefer roles over direct bitmask edits. If a bitmask change is necessary, record the current value and reason.

Separate Scopes

Platform admin and room admin are separate concepts. Diagnose permission issues by layer first.

Preferences Are Runtime Data

User preferences are changed through API/CLI and should not live in YAML or Helm values.

Verify Behavior

After changing join rules, permissions, or 2FA, test real login, room join, and playback flows.