fix: superadmin can edit own brands and modules in team panel
All checks were successful
Deploy / deploy (push) Successful in 11s
All checks were successful
Deploy / deploy (push) Successful in 11s
Brands and modules fields were hidden/disabled when editing self. Superadmins now see editable brands dropdown and modules toggles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -249,7 +249,7 @@ export default function TeamMemberPanel({ member, isEditingSelf, onClose, onSave
|
|||||||
|
|
||||||
<div ref={brandsDropdownRef} className="relative">
|
<div ref={brandsDropdownRef} className="relative">
|
||||||
<label className="block text-xs font-medium text-text-tertiary mb-1">{t('team.brands')}</label>
|
<label className="block text-xs font-medium text-text-tertiary mb-1">{t('team.brands')}</label>
|
||||||
{isEditingSelf ? (
|
{isEditingSelf && userRole !== 'superadmin' ? (
|
||||||
<div className="w-full px-3 py-2 text-sm border border-border rounded-lg bg-surface-tertiary text-text-tertiary cursor-not-allowed">
|
<div className="w-full px-3 py-2 text-sm border border-border rounded-lg bg-surface-tertiary text-text-tertiary cursor-not-allowed">
|
||||||
{(form.brands || []).length === 0 ? '—' : (form.brands || []).join(', ')}
|
{(form.brands || []).length === 0 ? '—' : (form.brands || []).join(', ')}
|
||||||
</div>
|
</div>
|
||||||
@@ -317,7 +317,7 @@ export default function TeamMemberPanel({ member, isEditingSelf, onClose, onSave
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Modules toggle */}
|
{/* Modules toggle */}
|
||||||
{!isEditingSelf && canManageTeam && (
|
{(!isEditingSelf || userRole === 'superadmin') && canManageTeam && (
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-xs font-medium text-text-tertiary mb-1">{t('team.modules')}</label>
|
<label className="block text-xs font-medium text-text-tertiary mb-1">{t('team.modules')}</label>
|
||||||
<div className="flex flex-wrap gap-2">
|
<div className="flex flex-wrap gap-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user