Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
permissions.ts630 B
import { Permission } from "@/api/openapi-schema"; import { useSession } from "@/auth"; import { hasPermissionOr } from "@/utils/permissions"; import { useWatch } from "./store"; export function useLibraryPagePermissions() { const account = useSession(); const owner = useWatch((s) => s.draft.owner); const isAllowedToEdit = hasPermissionOr( account, () => account?.id === owner.id, Permission.MANAGE_LIBRARY, ); const isAllowedToDelete = hasPermissionOr( account, () => account?.id === owner.id, Permission.MANAGE_LIBRARY, ); return { isAllowedToEdit, isAllowedToDelete, }; }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server