fix(role-compile,role-validate): таблица прав сверена с платформой

Замер: 27 объектов x 68 имён прав = 1836 ролей по одному праву, одна
загрузка и одна выгрузка. Оракул точный — неприменимое право платформа
молча выбрасывает, роль остаётся пустой и в логе ни строчки.

Лишнего в таблице не было, не хватало:
  BusinessProcess (14 -> 24), Task (14 -> 24),
  ChartOfCalculationTypes (15 -> 25) — InteractiveDeleteMarked и весь
  блок *DataHistory*;
  ChartOfAccounts (21 -> 25) — InteractiveDeleteMarked, ViewDataHistory,
  EditDataHistoryVersionComment, SwitchToDataHistoryVersion;
  CalculationRegister (2 -> 4) — Update, Edit.

До этого навык отвергал корректные права, а dsl-reference утверждал,
что InteractiveDeleteMarked у плана счетов не бывает.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FGkXwoXTuafcu1SXMsauFq
This commit is contained in:
Nick Shirokov
2026-09-13 15:57:32 +03:00
co-authored by Claude Opus 5
parent 6169a7ff93
commit c23cae39d8
21 changed files with 1845 additions and 87 deletions
@@ -1,4 +1,4 @@
# role-validate v1.5 — Validate 1C role structure
# role-validate v1.6 — Validate 1C role structure
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
[CmdletBinding(PositionalBinding=$false)]
param(
@@ -61,7 +61,9 @@ $script:knownRights = @{
)
"AccumulationRegister" = @("Read","Update","View","Edit","TotalsControl")
"AccountingRegister" = @("Read","Update","View","Edit","TotalsControl")
"CalculationRegister" = @("Read","View")
"CalculationRegister" = @(
"Read","Update","View","Edit"
)
"Constant" = @(
"Read","Update","View","Edit",
"ReadDataHistory","ViewDataHistory","UpdateDataHistory",
@@ -69,14 +71,13 @@ $script:knownRights = @{
"EditDataHistoryVersionComment","SwitchToDataHistoryVersion"
)
"ChartOfAccounts" = @(
"Read","Insert","Update","Delete","View","Edit","InputByString",
"InteractiveInsert","InteractiveSetDeletionMark","InteractiveClearDeletionMark",
"InteractiveDelete",
"InteractiveDeletePredefinedData","InteractiveSetDeletionMarkPredefinedData",
"InteractiveClearDeletionMarkPredefinedData","InteractiveDeleteMarkedPredefinedData",
"ReadDataHistory","ReadDataHistoryOfMissingData",
"UpdateDataHistory","UpdateDataHistoryOfMissingData",
"UpdateDataHistorySettings","UpdateDataHistoryVersionComment"
"Read","Insert","Update","Delete"
"View","Edit","InputByString","InteractiveInsert"
"InteractiveSetDeletionMark","InteractiveClearDeletionMark","InteractiveDelete","InteractiveDeleteMarked"
"InteractiveDeletePredefinedData","InteractiveSetDeletionMarkPredefinedData","InteractiveClearDeletionMarkPredefinedData","InteractiveDeleteMarkedPredefinedData"
"ReadDataHistory","ReadDataHistoryOfMissingData","UpdateDataHistory","UpdateDataHistoryOfMissingData"
"UpdateDataHistorySettings","UpdateDataHistoryVersionComment","ViewDataHistory","EditDataHistoryVersionComment"
"SwitchToDataHistoryVersion"
)
"ChartOfCharacteristicTypes" = @(
"Read","Insert","Update","Delete","View","Edit","InputByString",
@@ -90,11 +91,13 @@ $script:knownRights = @{
"EditDataHistoryVersionComment","SwitchToDataHistoryVersion"
)
"ChartOfCalculationTypes" = @(
"Read","Insert","Update","Delete","View","Edit","InputByString",
"InteractiveInsert","InteractiveSetDeletionMark","InteractiveClearDeletionMark",
"InteractiveDelete",
"InteractiveDeletePredefinedData","InteractiveSetDeletionMarkPredefinedData",
"InteractiveClearDeletionMarkPredefinedData","InteractiveDeleteMarkedPredefinedData"
"Read","Insert","Update","Delete"
"View","Edit","InputByString","InteractiveInsert"
"InteractiveSetDeletionMark","InteractiveClearDeletionMark","InteractiveDelete","InteractiveDeleteMarked"
"InteractiveDeletePredefinedData","InteractiveSetDeletionMarkPredefinedData","InteractiveClearDeletionMarkPredefinedData","InteractiveDeleteMarkedPredefinedData"
"ReadDataHistory","ReadDataHistoryOfMissingData","UpdateDataHistory","UpdateDataHistoryOfMissingData"
"UpdateDataHistorySettings","UpdateDataHistoryVersionComment","ViewDataHistory","EditDataHistoryVersionComment"
"SwitchToDataHistoryVersion"
)
"ExchangePlan" = @(
"Read","Insert","Update","Delete","View","Edit","InputByString",
@@ -106,14 +109,20 @@ $script:knownRights = @{
"EditDataHistoryVersionComment","SwitchToDataHistoryVersion"
)
"BusinessProcess" = @(
"Read","Insert","Update","Delete","View","Edit","InputByString",
"Start","InteractiveInsert","InteractiveSetDeletionMark","InteractiveClearDeletionMark",
"InteractiveDelete","InteractiveActivate","InteractiveStart"
"Read","Insert","Update","Delete"
"View","Edit","InputByString","Start"
"InteractiveInsert","InteractiveSetDeletionMark","InteractiveClearDeletionMark","InteractiveDelete"
"InteractiveDeleteMarked","InteractiveActivate","InteractiveStart","ReadDataHistory"
"ReadDataHistoryOfMissingData","UpdateDataHistory","UpdateDataHistoryOfMissingData","UpdateDataHistorySettings"
"UpdateDataHistoryVersionComment","ViewDataHistory","EditDataHistoryVersionComment","SwitchToDataHistoryVersion"
)
"Task" = @(
"Read","Insert","Update","Delete","View","Edit","InputByString",
"Execute","InteractiveInsert","InteractiveSetDeletionMark","InteractiveClearDeletionMark",
"InteractiveDelete","InteractiveActivate","InteractiveExecute"
"Read","Insert","Update","Delete"
"View","Edit","InputByString","Execute"
"InteractiveInsert","InteractiveSetDeletionMark","InteractiveClearDeletionMark","InteractiveDelete"
"InteractiveDeleteMarked","InteractiveActivate","InteractiveExecute","ReadDataHistory"
"ReadDataHistoryOfMissingData","UpdateDataHistory","UpdateDataHistoryOfMissingData","UpdateDataHistorySettings"
"UpdateDataHistoryVersionComment","ViewDataHistory","EditDataHistoryVersionComment","SwitchToDataHistoryVersion"
)
"DataProcessor" = @("Use","View")
"Report" = @("Use","View")
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# role-validate v1.5 — Validate 1C role Rights.xml structure
# role-validate v1.6 — Validate 1C role Rights.xml structure
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
"""Validates role Rights.xml: root element, global flags, objects, rights, RLS, templates."""
import sys, os, argparse, re
@@ -78,7 +78,9 @@ KNOWN_RIGHTS = {
],
'AccumulationRegister': ['Read', 'Update', 'View', 'Edit', 'TotalsControl'],
'AccountingRegister': ['Read', 'Update', 'View', 'Edit', 'TotalsControl'],
'CalculationRegister': ['Read', 'View'],
'CalculationRegister': [
'Read', 'Update', 'View', 'Edit',
],
'Constant': [
'Read', 'Update', 'View', 'Edit',
'ReadDataHistory', 'ViewDataHistory', 'UpdateDataHistory',
@@ -86,14 +88,13 @@ KNOWN_RIGHTS = {
'EditDataHistoryVersionComment', 'SwitchToDataHistoryVersion',
],
'ChartOfAccounts': [
'Read', 'Insert', 'Update', 'Delete', 'View', 'Edit', 'InputByString',
'InteractiveInsert', 'InteractiveSetDeletionMark', 'InteractiveClearDeletionMark',
'InteractiveDelete',
'InteractiveDeletePredefinedData', 'InteractiveSetDeletionMarkPredefinedData',
'InteractiveClearDeletionMarkPredefinedData', 'InteractiveDeleteMarkedPredefinedData',
'ReadDataHistory', 'ReadDataHistoryOfMissingData',
'UpdateDataHistory', 'UpdateDataHistoryOfMissingData',
'UpdateDataHistorySettings', 'UpdateDataHistoryVersionComment',
'Read', 'Insert', 'Update', 'Delete',
'View', 'Edit', 'InputByString', 'InteractiveInsert',
'InteractiveSetDeletionMark', 'InteractiveClearDeletionMark', 'InteractiveDelete', 'InteractiveDeleteMarked',
'InteractiveDeletePredefinedData', 'InteractiveSetDeletionMarkPredefinedData', 'InteractiveClearDeletionMarkPredefinedData', 'InteractiveDeleteMarkedPredefinedData',
'ReadDataHistory', 'ReadDataHistoryOfMissingData', 'UpdateDataHistory', 'UpdateDataHistoryOfMissingData',
'UpdateDataHistorySettings', 'UpdateDataHistoryVersionComment', 'ViewDataHistory', 'EditDataHistoryVersionComment',
'SwitchToDataHistoryVersion',
],
'ChartOfCharacteristicTypes': [
'Read', 'Insert', 'Update', 'Delete', 'View', 'Edit', 'InputByString',
@@ -107,11 +108,13 @@ KNOWN_RIGHTS = {
'EditDataHistoryVersionComment', 'SwitchToDataHistoryVersion',
],
'ChartOfCalculationTypes': [
'Read', 'Insert', 'Update', 'Delete', 'View', 'Edit', 'InputByString',
'InteractiveInsert', 'InteractiveSetDeletionMark', 'InteractiveClearDeletionMark',
'InteractiveDelete',
'InteractiveDeletePredefinedData', 'InteractiveSetDeletionMarkPredefinedData',
'InteractiveClearDeletionMarkPredefinedData', 'InteractiveDeleteMarkedPredefinedData',
'Read', 'Insert', 'Update', 'Delete',
'View', 'Edit', 'InputByString', 'InteractiveInsert',
'InteractiveSetDeletionMark', 'InteractiveClearDeletionMark', 'InteractiveDelete', 'InteractiveDeleteMarked',
'InteractiveDeletePredefinedData', 'InteractiveSetDeletionMarkPredefinedData', 'InteractiveClearDeletionMarkPredefinedData', 'InteractiveDeleteMarkedPredefinedData',
'ReadDataHistory', 'ReadDataHistoryOfMissingData', 'UpdateDataHistory', 'UpdateDataHistoryOfMissingData',
'UpdateDataHistorySettings', 'UpdateDataHistoryVersionComment', 'ViewDataHistory', 'EditDataHistoryVersionComment',
'SwitchToDataHistoryVersion',
],
'ExchangePlan': [
'Read', 'Insert', 'Update', 'Delete', 'View', 'Edit', 'InputByString',
@@ -123,14 +126,20 @@ KNOWN_RIGHTS = {
'EditDataHistoryVersionComment', 'SwitchToDataHistoryVersion',
],
'BusinessProcess': [
'Read', 'Insert', 'Update', 'Delete', 'View', 'Edit', 'InputByString',
'Start', 'InteractiveInsert', 'InteractiveSetDeletionMark', 'InteractiveClearDeletionMark',
'InteractiveDelete', 'InteractiveActivate', 'InteractiveStart',
'Read', 'Insert', 'Update', 'Delete',
'View', 'Edit', 'InputByString', 'Start',
'InteractiveInsert', 'InteractiveSetDeletionMark', 'InteractiveClearDeletionMark', 'InteractiveDelete',
'InteractiveDeleteMarked', 'InteractiveActivate', 'InteractiveStart', 'ReadDataHistory',
'ReadDataHistoryOfMissingData', 'UpdateDataHistory', 'UpdateDataHistoryOfMissingData', 'UpdateDataHistorySettings',
'UpdateDataHistoryVersionComment', 'ViewDataHistory', 'EditDataHistoryVersionComment', 'SwitchToDataHistoryVersion',
],
'Task': [
'Read', 'Insert', 'Update', 'Delete', 'View', 'Edit', 'InputByString',
'Execute', 'InteractiveInsert', 'InteractiveSetDeletionMark', 'InteractiveClearDeletionMark',
'InteractiveDelete', 'InteractiveActivate', 'InteractiveExecute',
'Read', 'Insert', 'Update', 'Delete',
'View', 'Edit', 'InputByString', 'Execute',
'InteractiveInsert', 'InteractiveSetDeletionMark', 'InteractiveClearDeletionMark', 'InteractiveDelete',
'InteractiveDeleteMarked', 'InteractiveActivate', 'InteractiveExecute', 'ReadDataHistory',
'ReadDataHistoryOfMissingData', 'UpdateDataHistory', 'UpdateDataHistoryOfMissingData', 'UpdateDataHistorySettings',
'UpdateDataHistoryVersionComment', 'ViewDataHistory', 'EditDataHistoryVersionComment', 'SwitchToDataHistoryVersion',
],
'DataProcessor': ['Use', 'View'],
'Report': ['Use', 'View'],