adjust citysite table name to activesites

This commit is contained in:
Alberto-Audrix committed 2026-09-11 15:51:29 +07:00
1 parent fb0f996776
commit 64b37b6b6d
27 files changed
+382 -221

No files matched your search

+9 -9
View File
@@ -7,9 +7,9 @@ Main-office **mirror API** for the executive frontend. Domain shapes match site
| Status | Capabilities | Data scope |
|--------|----------------|------------|
| `director`, `director_admin` | **View only** (director_admin may repair farm structure writes). Not Django superuser. | **All** sites / GMs |
| `buh`, `bu_admin` | **View only** | Rollup of managed GMs' registered city sites |
| `gm` | View + register city URLs + sync + **approve cycle close** | Own sites / city sites |
| `gm_admin` | Same as GM **except** no cycle-close approval | Own sites / city sites |
| `buh`, `bu_admin` | **View only** | Rollup of managed GMs' registered active sites |
| `gm` | View + register site URLs + sync + **approve cycle close** | Own sites / active sites |
| `gm_admin` | Same as GM **except** no cycle-close approval | Own sites / active sites |
| `account_admin` | **User Management only** (create / deactivate / reset password). No ops dashboards. Temp passwords shared out-of-band. | Users list (all product users; never lists `superuser`). |
| `superuser` | Break-glass: **ops dashboards (director scope) + Manajemen Akun**. Not creatable via UI; hidden from user lists. | All sites / GMs |
| `inactive` | Locked out | — |
@@ -17,17 +17,17 @@ Main-office **mirror API** for the executive frontend. Domain shapes match site
`bootstrap_admin` / seed `admin` uses status `superuser`. This app does not use `is_staff`.
GM↔BUH link: `User.managed_by` (confirmed). **Only `gm`** may request a **`buh`** (not `bu_admin` / `gm_admin`); **only that `buh`** may approve.
City registry ownership: `CitySite.registered_by`.
GM farm visibility follows the Pengaturan city-site list: only HQ `Site` rows linked to an active registered `CitySite` are shown (empty list ⇒ no sites).
Active site registry ownership: `ActiveSite.registered_by`.
GM farm visibility follows the Pengaturan active-site list: only HQ `Site` rows linked to an enabled registered `ActiveSite` are shown (empty list ⇒ no sites).
BUH farm visibility is the union of those lists for **confirmed** managed GMs (read-only Pengaturan rollup; optional GM filter in the header).
`POST /api/v1/cycles/{id}/approve-close/` — GM only.
`POST /api/v1/city-sites/` — GM / GM Admin.
`POST /api/v1/active-sites/` — GM / GM Admin.
## City registry
## Active site registry
`GET/POST /api/v1/city-sites/` — register city dashboard APIs.
`POST /api/v1/city-sites/{id}/sync/` and `POST /api/v1/city-sites/sync-all/` — stubs (`501`) until mirror pull is built.
`GET/POST /api/v1/active-sites/` — register farm-location dashboard APIs.
`POST /api/v1/active-sites/{id}/sync/` and `POST /api/v1/active-sites/sync-all/` — stubs (`501`) until mirror pull is built.
## Setup