Organization Settings
Settings > Organization holds the settings that apply to the whole organization. Every member with the Read role or above can see them; only an Admin can change them. A Member does not see this page.
| Setting | What it does |
|---|---|
| Organization Name | The name shown across the app and in emails. |
| Organization ID | The organization's identifier. It cannot be changed. |
| Audit log retention (days) | How long audit log entries are kept, 1 to 365 days, 90 by default. Lowering it asks for confirmation first and deletes older entries permanently. |
| Required approvals | How many distinct people must approve a tracked run before it applies. 1 by default. See Approval policy. |
| Block approval by the person who started the run | When on, the person who started a run cannot be one of its approvers. Off by default. See Approval policy. |
The page also shows the organization's worker capacity.
Every change is recorded in the audit log as an organization update. A change of the retention or of the approval policy also records the old and new values.
Approval policy
The approval policy decides who must approve a tracked run before Zenfra applies it. An organization that never changed it keeps the default: one approval from anyone allowed to approve the run, the person who started it included.
- Required approvals is 1 or more. Each person counts once, however many times they approve, and an API key counts as the person who created it.
- Block approval by the person who started the run excludes that person from approving. The rule knows only who started the run:
- A run started from the app or through the API with a user's credentials excludes that user, also when they approve through their API key.
- A run started by a push, a pull request or a drift schedule excludes nobody. The author of the commit or of the pull request is not excluded.
- The policy applies to runs created after you save. A run takes the policy in force when it is created and keeps it. Runs already waiting for approval when you change the setting are not affected.
- Set a number of required approvals that the people allowed to approve can reach. A run whose required approvals cannot be met waits until its approval deadline and may then be cancelled automatically.
How approvals are counted, shown on the run page and refused is described under Approvals.
API
GET /api/v1/organizations/current returns the settings; PUT /api/v1/organizations/current changes them (Admin only). Send only the fields you change; a field you leave out keeps its value.
{
"settings": {
"audit_retention_days": 90,
"approval_policy": {
"required_approvals": 2,
"block_self_approval": true
}
}
}
approval_policy is always present in the response, with the defaults (1, false) for an organization that never set it. required_approvals below 1 is refused with 400; there is no upper limit. Each of the two fields can be sent on its own.