ores.iam.permission
Table of Contents
An atomic permission that can be granted to roles. Permissions follow the
hierarchical naming convention component::resource:action (for example
iam::accounts:create; "*" grants everything and component::* grants
every action within one component).
The table is temporal (see
projects/ores.sql/create/iam/iam_permissions_create.sql): it carries
valid_from=/=valid_to, the GIST exclusion and the delete rule, but it has
no version column and no audit tail – permissions are system-defined
constants seeded from bootstrap data, not user-editable records, so they
need no change tracking. The :no_audit_columns: flag in the * SQL **
Flags drawer selects exactly that shape: it drops the version column and
the four audit columns while keeping the transaction-time window. The
:skip_uuid_check: suppression on id drops the nil-UUID check the
hand-written table never had.
1. Flags
2. Natural keys
3. Columns
3.1. id
Unique identifier for the permission.
3.2. code
Permission code following the format "component::resource:action".
Examples: "iam::accounts:create", "refdata::currencies:read". Use "" for the wildcard that grants every permission, and "component::" for every permission within one component.
std::string("test::") + ctx.alphanumeric(6) + ":read"
3.3. description
Human-readable description of what this permission allows.
std::string("Synthetic test permission")
4. SQL
4.1. Flags
5. C++
5.1. Flags
5.2. Repository
5.3. Domain includes
#include <chrono> #include <boost/uuid/uuid.hpp> #include <string>
5.4. Entity includes
#include <string> #include "sqlgen/Timestamp.hpp" #include "sqlgen/PrimaryKey.hpp"
5.5. Conventions
5.6. Table display
| column | header |
|---|---|
| id | ID (UUID) |
| code | Code |
| description | Description |
5.7. Presentation
The screen's declaration. Every permission is seeded by the SQL create script,
so the screen introduces none. code is the natural key, which is what the
route's path segment carries and what the BFF addresses the entity by.
5.7.1. Detail fields
| field | label | widget | type | is_key | is_required | placeholder |
|---|---|---|---|---|---|---|
| code | Code | codeEdit | line_edit | true | true | Enter a permission code |
| description | Description | descriptionEdit | text_edit | Enter a description |
5.7.2. Columns
| enum_name | field | header | type | width |
|---|---|---|---|---|
| Code | code | Code | string | 260 |
| Description | description | Description | string | 480 |
5.8. Paste blocks
6. See also
- ores.iam — component group overview.