Added Roles and Permissions. Some minor UI fixes

This commit is contained in:
2026-02-18 13:12:55 +02:00
parent f54cdd525d
commit dbd15c00f8
31 changed files with 1825 additions and 331 deletions

View File

@@ -24,8 +24,8 @@ function Field({ label, children }) {
export default function MelodyDetail() {
const { id } = useParams();
const navigate = useNavigate();
const { hasRole } = useAuth();
const canEdit = hasRole("superadmin", "melody_editor");
const { hasPermission } = useAuth();
const canEdit = hasPermission("melodies", "edit");
const [melody, setMelody] = useState(null);
const [files, setFiles] = useState({});