ECM core on a JNDI data source: users, groups, central ACLs bound to objects, masks, documents; evaluate the access of a user (OpenAPI).
| Id | ecm-core |
|---|---|
| Role | rfc - needed for the page and the REST API (administrators always may) |
| Page | Plugins > Open (overlay with an X at the top right) or /plugins/ecm-core/ |
| REST | /api/plugins/ecm-core/… and, for callers with the role, /plugins/ecm-core/… |
| Mount | /api/ecm |
In the administration open Plugins, select the row of this plug-in and press Open. The page opens in an overlay dialog: close it with the X at the top right, with Esc or by clicking outside; Open in a new tab next to the title shows it full size.
The page has these sections: Data source, Tables, Users and groups, Central ACLs, Objects, Access evaluation, API.
| Label | Meaning |
|---|---|
| Id (empty: next free) | |
| Name | |
| Login (the caller of the API) | |
| Member of (names or ids, comma separated) | |
| Description | |
| Name (optional) | |
| ACL string, e.g. 75PYJA (Everyone) | |
| ACL id (empty: that of the folder) | |
| ACL id (see the ACL tab) | |
| JNDI data source (page Data sources) | |
| Table prefix | |
| Folder of the documents | |
| Object without ACL | |
| Look at it as | |
| needs | |
| Table | Column of a table |
| Exists | Column of a table |
| Rows | Column of a table |
| Id | Column of a table |
| Type | Column of a table |
| Login | Column of a table |
| Member of | Column of a table |
| Entries | Column of a table |
| Objects | Column of a table |
| ACL | Column of a table |
| Access of the user | Column of a table |
| Groups | Column of a table |
| ACLs with read | Column of a table |
| Readable objects | Column of a table |
ECM functions for Vibecat on a JNDI data source, cloned from the VECDS core and the ECM libraries (ecm_vscode\libs): users and groups, central ACL tables bound to the objects by aclid, keyword masks, folders and documents, and an access evaluation that works like VECDS. The API is described by OpenAPI: GET /api/ecm/openapi.json.
PUT /settings {“dataSource”: “jdbc/ecm”}, then Create the tables (POST /schema/install, idempotent). table (prefix ecm_) | content |
|---|---|
| userobject, groupmember | users and groups with the ids of the ELO system; nested groups |
| acl, ace | the central ACLs and their entries (principal, rights bit mask, deny) |
| objekte | folders and documents; aclid binds an ACL; soft delete |
| docmasks, masklines, objkeys | masks, their keywords, the keyword values of the objects |
| report | writes, ACL changes and denied accesses |
The documents are files in the storage folder (guid[0..2]/guid[2..4]/guid.ext, MD5 checksum).
| right | bit | needed for |
|---|---|---|
| read (R) | 1 | see / read an object, download the document |
| write (W) | 2 | change the object and its keywords |
| delete (D) | 4 | delete the object (and everything below) |
| edit (E) | 8 | store a new document |
| list (L) | 16 | add an object to a folder / move it there |
| permission (P) | 32 | bind another ACL to the object |
| space (S) | 64 | kept for the workspace rights of ELO |
ComputeEffectiveAccess. Keyword entries (ELO “key” entries) are kept but do not count.allow & ~deny.noAcl = none closes it.aclId / aclString is not given.75PYJA = Everyone with 31) are read and written: POST /acls/import, GET /acls/{id}/export, aclString when creating an object or ACL. The ACL with the same entries is reused.
An administrator sees everything. Add asUser=<id | login | name> to any object call and the call is read as that user: lists are filtered (right=read by default), single objects answer 403 without the right, writes need write / list / delete / permission, and every object carries access (the rights of the user). A caller who is not an administrator is mapped to the user with his login.
GET /api/ecm/objects?parentId=root&asUser=alice what may Alice read
GET /api/ecm/objects?asUser=alice&right=write&nameLike=offer what may she change
GET /api/ecm/objects/12?asUser=carol 403 when she may not read it
GET /api/ecm/access/check?user=alice&object=12&right=write allowed? why? (principals, matching entries, all entries)
GET /api/ecm/access/search?q=sales users and groups: groups, ACLs with read, readable objects
GET /api/ecm/access/user/alice everything alice reaches: ACLs with rights and entries
GET /api/ecm/access/user/9998/objects?right=read what a group may read
GET /api/ecm/acls/5/effective every user with rights on ACL 5 (groups resolved)
POST /api/ecm/access/evaluate {"user":"alice","right":"read","objects":[1,2,3]}
POST /api/ecm/token/queryAclToken {"userId":4,"ttlMinutes":30} then ...?aclToken=... reads as that user
POST /principals {"type":"GROUP","name":"Sales"} POST /principals {"type":"USER","name":"Alice","login":"alice","groups":["Sales"]}
POST /acls {"name":"Sales read","entries":[{"principal":"Sales","rights":"RL"},{"principal":"Accounting","rights":"R","deny":true}]}
POST /objects {"name":"Offers","type":"FOLDER","parentId":1,"aclId":3,"metadata":{"CUSTOMER":"ACME"}}
PUT /objects/12/acl {"aclId":4} PUT /objects/12/content?fileName=offer.pdf (the body is the file)
GET /objects/12/content GET /objects?metadata=CUSTOMER%3DACME
Rights can be a number (17), letters (“RWDELP”), names (“read,list”, [“read”,“list”], all, readonly).
On the web ports the plug-in is mounted at /api/ecm (Basic login or Authorization: Bearer <API key>); on the administration port the same calls are below /api/plugins/ecm-core. Objects, masks (read) are open to the role rfc, everything that manages users, ACLs, masks, settings or evaluates other users needs the admin role. Errors are JSON {“error”: “…”} with the status (400 / 403 / 404 / 409).
Hibernate entities of ecm_vscode were turned into plain JDBC tables; not taken over: document history (dochistory), sticky notes, object history keys and the Elasticsearch sync (the report table records the writes). Keyword entries of ACL strings are stored but do not count (as in VECDS); the andGroups of ACL items are not supported.