export_security_system()
Exports the permission clauses and rights bit fields configured at the group level of the security system. Returns one entry per (group × cabinet × object type) with the granted main rights, annotation rights and any configured permission clauses.
The security system has two parallel mechanisms: clauses at the group level (this job) and ACL rules at the object level (dms.ReadSD).
1. Signature
-
Sync
-
Async
ecm.security.export_security_system(group_ids: list[int] | None = None) -> ECMSecuritySystemExport
await ecm.security.export_security_system(group_ids: list[int] | None = None) -> ECMSecuritySystemExport
2. Parameters
| Parameter | Default | Description |
|---|---|---|
|
|
List of numeric group IDs (see |
3. Return value
ECMSecuritySystemExport with three fields:
| Field | Type | Description |
|---|---|---|
|
|
Server-side creation timestamp from the |
|
|
One |
|
|
The groups covered by the export. |
3.1. ECMGroupClause fields
| Field | Type | Description |
|---|---|---|
|
|
Numeric ID of the group. |
|
|
Display name of the group. |
|
|
Numeric ID of the cabinet. |
|
|
Display name of the cabinet. |
|
|
Numeric ID of the object type. Resolve via |
|
|
Display name of the object type. |
|
|
Bit field of granted main rights. |
|
|
Bit field of granted annotation rights. |
|
|
Clause for D (delete object). Empty string when no clause is configured. |
|
|
Clause for W (write index data). |
|
|
Clause for X (output object). |
|
|
Clause for U (write object). |
|
|
Clause for R (display index data) — historically called „Hilfsrecht". |
|
|
Legacy attribute, always empty; can be ignored. |
4. Examples
4.1. Export all groups
-
Sync
-
Async
export = ecm.security.export_security_system()
print(export.timestamp)
for grp in export.exported_groups:
print(grp.id, grp.name)
export = await ecm.security.export_security_system()
4.2. Find configured delete clauses per group
export = ecm.security.export_security_system()
for clause in export.group_clauses:
if clause.delete_clause:
print(f"{clause.group_name} / {clause.object_type_name}: {clause.delete_clause}")
4.4. Inspect rights as flag set
from ecmind_blue_client.ecm import ECMObjectRight
export = ecm.security.export_security_system()
for clause in export.group_clauses:
if ECMObjectRight.D in clause.rights and clause.delete_clause:
# Group may delete, but only when the clause matches.
print(clause.group_name, clause.object_type_name, clause.delete_clause)
5. Clause language
The *_clause strings are the raw server-side clauses. Key rules:
-
Clauses start with the syntax-version prefix
BCCF. -
Field references
access DB columns of the object (feldN,zahlN,realN,datumN). Resolve to internal field names viaecm.system.definition(). -
sys'<name>'references base parameters (e.g.sys’modifyuser'). -
folder( <expr> )evaluates the inner expression in the parent folder’s context. Not allowed on folder object types themselves. -
Operators:
=,!=,>,<,>=,⇐,in,not in,between,not between,and,or. -
Variables:
DATE,DATETIME,TIME,USER,GROUPS,RIGHTGROUP,COMPUTERNAME,COMPUTERGUID,COMPUTERIP.
6. See also
-
groups() — returns the groups with their
idfields forgroup_ids -
group() — detail attributes of a single group
-
ecm.system.definition() — resolve
cabinet_id,object_type_idand DB columns to display / internal names