fix: anyone_can_start not working as Admin
Build & Push Docker Image / build (push) Successful in 4m24s

This commit is contained in:
2026-04-23 09:32:55 +02:00
parent 995d6eabf7
commit de696d422a
2 changed files with 11 additions and 6 deletions
+5 -2
View File
@@ -62,7 +62,10 @@ export default function RoomDetail() {
const isOwner = room && user && room.user_id === user.id;
const isShared = room && !!room.shared;
const isAdmin = user?.role === 'admin';
const canManage = isOwner || isShared;
const canStart = canManage || isAdmin || !!room?.anyone_can_start;
const canEnd = canManage || isAdmin;
const fetchRoom = async () => {
try {
@@ -452,7 +455,7 @@ export default function RoomDetail() {
<span className="hidden sm:inline">{t('federation.inviteRemote')}</span>
</button>
)}
{canManage && !status.running && !waitingToJoin && (
{canStart && !status.running && !waitingToJoin && (
<button onClick={handleStart} disabled={actionLoading === 'start'} className="btn-primary">
{actionLoading === 'start' ? <Loader2 size={16} className="animate-spin" /> : <Play size={16} />}
{t('room.start')}
@@ -467,7 +470,7 @@ export default function RoomDetail() {
{(actionLoading === 'join' || waitingToJoin) ? <Loader2 size={16} className="animate-spin" /> : <ExternalLink size={16} />}
{waitingToJoin ? t('room.waitingToJoin') : t('room.join')}
</button>
{canManage && status.running && (
{canEnd && status.running && (
<button onClick={handleEnd} disabled={actionLoading === 'end'} className="btn-danger">
{actionLoading === 'end' ? <Loader2 size={16} className="animate-spin" /> : <Square size={16} />}
{t('room.end')}