diff --git a/.claude/skills/role-compile/SKILL.md b/.claude/skills/role-compile/SKILL.md index 33b3052cf..b29653cb0 100644 --- a/.claude/skills/role-compile/SKILL.md +++ b/.claude/skills/role-compile/SKILL.md @@ -44,12 +44,13 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/role-compile.ps1" - "Document.Реализация: @edit", "DataProcessor.Загрузка: @view", "InformationRegister.Цены: Read, Update", - { "name": "Document.Продажа", "preset": "view", "rights": {"Delete": false}, "rls": {"Read": "#Шаблон(\"\")"} } + { "name": "Document.Продажа", "preset": "view", "rls": {"Read": "#Шаблон(\"\")"} }, + { "name": "Catalog.Номенклатура.Attribute.Цена", "rights": {"View": false} } ] ``` - Shorthand: `"Тип.Имя: @пресет"` или `"Тип.Имя: Право1, Право2"` -- Объектная форма: `preset` + `rights` (переопределения) + `rls` (ограничения) +- Объектная форма: `preset` + `rights` (точечные значения прав) + `rls` (ограничения) ### Пресеты @@ -60,10 +61,6 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/role-compile.ps1" - `@` обязателен в shorthand. В объектной форме — `"preset": "view"` без `@`. -### Зависимые права - -Набор прав дополняется до замыкания: `Edit` тянет `Read`, `Update`, `View`; интерактивные права — -свой базовый набор; `View` у обработки и отчёта — `Use`. Дописанное перечисляется в выводе. ### Сервисы @@ -78,9 +75,6 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/role-compile.ps1" - Часть маршрутов — полным путём: `"HTTPService.ЭДО.URLTemplate.ЕстьНовыеДокументы.Method.POST: Use"`. -### Русские синонимы - -Поддерживаются русские типы (`Справочник`→Catalog, `Документ`→Document) и права (`Чтение`→Read, `Просмотр`→View). Каноничная форма — английская. ### Шаблоны RLS diff --git a/.claude/skills/role-compile/scripts/role-compile.ps1 b/.claude/skills/role-compile/scripts/role-compile.ps1 index 0dcb35ea9..afa97a641 100644 --- a/.claude/skills/role-compile/scripts/role-compile.ps1 +++ b/.claude/skills/role-compile/scripts/role-compile.ps1 @@ -1,4 +1,4 @@ -# role-compile v1.42 — Compile 1C role from JSON +# role-compile v1.43 — Compile 1C role from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills [CmdletBinding(PositionalBinding=$false)] param( diff --git a/.claude/skills/role-compile/scripts/role-compile.py b/.claude/skills/role-compile/scripts/role-compile.py index 09b54abc1..a0d01cb22 100644 --- a/.claude/skills/role-compile/scripts/role-compile.py +++ b/.claude/skills/role-compile/scripts/role-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# role-compile v1.42 — Compile 1C role from JSON +# role-compile v1.43 — Compile 1C role from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import json diff --git a/.claude/skills/role-edit/SKILL.md b/.claude/skills/role-edit/SKILL.md index 077949a71..d11f4e5cd 100644 --- a/.claude/skills/role-edit/SKILL.md +++ b/.claude/skills/role-edit/SKILL.md @@ -78,14 +78,12 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/role-edit.ps1" -Rol ## Права -Имена объектов и прав — те же, что в `/role-compile`: английские (`Catalog`, `Read`) или русские -(`Справочник`, `Чтение`), пресеты `@view` и `@edit`, вложенные пути -(`Catalog.Контрагенты.Attribute.ИНН: View, Edit`), короткая запись сервиса +Имена объектов и прав — те же, что в `/role-compile`: `Catalog`, `Read`, пресеты `@view` и +`@edit`, вложенные пути (`Catalog.Контрагенты.Attribute.ИНН: View, Edit`), короткая запись сервиса (`HTTPService.ЭДО: Use` раскрывается по всем методам шаблонов URL). -Набор прав дополняется до замыкания: `Edit` тянет `Read`, `Update`, `View`; `View` у обработки и -отчёта — `Use`. Снятие работает в обратную сторону: снимаешь `Read` — уходят и права, которые его -требуют. Дописанное и снятое каскадом перечисляется в выводе. +`remove-rights` и `deny-rights` задевают больше перечисленного: уходят и права, которым снятое +нужно (сняли `Read` — уйдут `Update`, `View`, `Edit`). Снятое каскадом перечисляется в выводе. Роль хранит только то, что отличается от её умолчаний, — всё совпавшее навык не пишет и говорит об этом: diff --git a/.claude/skills/role-edit/scripts/role-edit.ps1 b/.claude/skills/role-edit/scripts/role-edit.ps1 index e54e39d64..50e19a3e8 100644 --- a/.claude/skills/role-edit/scripts/role-edit.ps1 +++ b/.claude/skills/role-edit/scripts/role-edit.ps1 @@ -1,4 +1,4 @@ -# role-edit v1.3 — Edit existing 1C role rights in place +# role-edit v1.4 — Edit existing 1C role rights in place # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills [CmdletBinding(PositionalBinding=$false)] param( diff --git a/.claude/skills/role-edit/scripts/role-edit.py b/.claude/skills/role-edit/scripts/role-edit.py index 783c219f7..f1642d47e 100644 --- a/.claude/skills/role-edit/scripts/role-edit.py +++ b/.claude/skills/role-edit/scripts/role-edit.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# role-edit v1.3 — Edit existing 1C role rights in place +# role-edit v1.4 — Edit existing 1C role rights in place # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import json