मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)8.1k · #12575

webiny-admin-permissions

यह क्या करती है

यह स्किल आपके AI को Webiny एडमिन इंटरफ़ेस में अनुमति नियंत्रण जोड़ते समय मार्गदर्शन देती है। यह उन डेवलपर्स के लिए है जिन्हें एडमिन पैनल में उपयोगकर्ता क्या देख या कर सकते हैं, यह सीमित करना है।

कब इस्तेमाल करें

  • ✓जब आपको Webiny एडमिन फ़ीचर में अनुमति सेटिंग्स जोड़नी हों।
  • ✓जब आप चाहते हों कि अनुमति फ़ॉर्म हाथ से लिखने की जगह एक schema से बने।
  • ✓जब एडमिन स्क्रीन का कोई हिस्सा उपयोगकर्ता की अनुमतियों के आधार पर दिखे या छिपे।

Skill का लिंक

https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/admin-permissions/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/admin-permissions/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“Webiny एडमिन में मेरे products सेक्शन के लिए अनुमति नियंत्रण जोड़िए, जिसमें संपादन और आयात के लिए अलग नियम हों।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल बताती है कि permission schema कैसे परिभाषित करें, जिससे अनुमति फ़ॉर्म बनता है। वह inject होने वाली अनुमति जाँच और उस कंपोनेंट को भी कवर करती है जो इंटरफ़ेस के हिस्से दिखाता या छिपाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Admin Permissions

Overview

Permissions follow three layers: domain (schema), features (DI artifacts + registration), and presentation (hooks, components, UI config). The framework auto-generates the permission UI from a schema and provides injectable permission checking via the DI container.

Layer 1: Domain — Permission Schema

Define the schema in src/domain/permissionsSchema.ts:

import { createPermissionSchema } from "webiny/admin/security";

export const SM_PERMISSIONS_SCHEMA = createPermissionSchema({
  prefix: "sm",
  fullAccess: true,
  entities: [
    {
      id: "product",
      title: "Products",
      permission: "sm.product",
      scopes: ["full", "own"],
      actions: [
        { name: "rwd" },
        { name: "pw" },
        { name: "import", label: "Import products" },
        { name: "export", label: "Export products" }
      ]
    },
    {
      id: "category",
      title: "Categories",
      permission: "sm.category",
      scopes: ["full"],
      actions: [{ name: "rwd" }]
    },
    {
      id: "settings",
      title: "Settings",
      permission: "sm.settings",
      scopes: ["full"]
    }
  ]
});

Schema Reference

Field Type Required Description
prefix string Yes Permission prefix (e.g., "sm")
fullAccess true | object Yes true for standard full access. Pass an object with custom boolean flags for full-access extras (e.g., { canForceUnlock: true }).
readOnlyAccess boolean No Whether to show a "Read-only access" option
entities EntityDefinition[] No Entity definitions. Omit for binary full/no access.

Entity Definition

Field Type Required Description
id string Yes Unique identifier for form field naming
title string No Display title. Falls back to id.
permission string Yes Permission name emitted (e.g., "sm.product")
scopes ("full" | "own")[] Yes Available access scopes
actions ActionDefinition[] No Actions on this entity
dependsOn { entity: string; requires: string } No Dependency on another entity

Actions

  • { name: "rwd" } — Read/Write/Delete select dropdown. Auto-set to "rwd" when scope is "own".
  • { name: "pw" } — Publish/Unpublish checkbox group.
  • { name: "custom", label: "Label" } — Custom boolean flag.

Entity Dependencies

Child entities can depend on a parent. If the parent lacks the required action, the child is pruned from output. "own" scope cascades to dependents.

{
    id: "review",
    permission: "sm.review",
    scopes: ["full", "own"],
    actions: [{ name: "rwd" }],
    dependsOn: { entity: "product", requires: "r" }
}

Simple Apps (No Entities)

Omit entities for binary full/no access:

export const MA_PERMISSIONS_SCHEMA = createPermissionSchema({
  prefix: "ma",
  fullAccess: true
});

Layer 2: Features — DI Artifacts + Registration

Abstraction (src/features/permissions/abstractions.ts)

import { createPermissionsAbstraction } from "webiny/admin/security";
import type { Permissions } from "webiny/admin/security";
import { SM_PERMISSIONS_SCHEMA } from "~/domain/permissionsSchema.js";

export const SmPermissions = createPermissionsAbstraction(SM_PERMISSIONS_SCHEMA);

export namespac
अक्सर पूछे जाने वाले सवाल

permission schema क्या करता है?

यह entities, उनकी कार्रवाइयाँ और scopes परिभाषित करता है, और उसी से एडमिन फ़ॉर्म बनता है।

कोड में अनुमतियाँ कैसे जाँची जाती हैं?

स्किल inject होने वाली अनुमति जाँच और कंपोनेंट के लिए एक typed hook बताती है।

क्या यह सर्वर साइड भी कवर करता है?

स्किल एडमिन यूज़र इंटरफ़ेस और उस परत में अनुमति जाँच पर केंद्रित है।

जानकारी

लेखक का मूल विवरण

Admin-side permission UI registration and DI-backed permission checking. Use this skill when adding permission controls to the admin UI — schema-based auto-generated forms, injectable permissions via createPermissionsAbstraction/ createPermissionsFeature, typed hooks (createUsePermissions), the HasPermission component (createHasPermission), and the Security.Permissions component props. Covers both simple apps and complex multi-entity permission schemas.

repo: webiny/webiny-js

लोकप्रियता

GitHub स्टार
8.1k
रैंकिंग में स्थान
#12575
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

prd-to-plan

8.1k

यह आपके एजेंट को प्रोडक्ट आवश्यकताओं के दस्तावेज़ को छोटे, एंड-टू-एंड स्लाइस की चरणबद्ध योजना में बदलने में मदद करती है, जो Markdown फ़ाइल में सहेजी जाती है।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

webiny-admin-architect

8.1k

यह आपके एजेंट को Webiny प्लेटफ़ॉर्म के लिए एडमिन स्क्रीन बनाना सिखाती है, उसकी बिज़नेस लॉजिक परतों और presenter पैटर्न का उपयोग करके।

कोडिंगवेबसाइट और UI (frontend)

webiny-form-model

8.1k

यह आपके एजेंट को Webiny में declarative field builder, layouts, validation और शर्त वाले नियमों से फ़ॉर्म बनाना सिखाती है।

कोडिंगवेबसाइट और UI (frontend)

webiny-new-entry-wizard

8.1k

यह आपके एजेंट को Webiny CMS में नई एंट्री के लिए कस्टम सेटअप विज़ार्ड जोड़ना सिखाती है, जो पहले कुछ फ़ील्ड लेता है और फिर एंट्री फ़ॉर्म पहले से भरता है।

कोडिंगवेबसाइट और UI (frontend)

मिलती-जुलती skills