myxce/src/frontend/apiserver
Rongsong Shen 4a38bb3ca9
fix(apiserver): enforce self_ug job scopes and accept project filters (bug-1934, bug-1935)
bug-1934: every job-permission check read a single scope and compared it
only with "self", so a job:view or job:control grant scoped to self_ug acted
like "all" (list, get by ID, control), and self + self_ug collapsed to self.
userJobScope() now collects all of a user's grants of a job permission
before deduplication and adds them up (all; self; self_ug = the user and
everyone sharing a user group). The job list appends a submit_user filter
for narrower scopes, get-by-ID keeps covered rows in a new slice (removing
from the ranged slice skipped rows) and answers 403, both control paths
and job output check the owner against the scope. User groups now reach
the apiserver: the config push converts cluster_config_t.ugroups and
OnUserGroupsUpdated() replaces the new store (nested groups, all,
exclusions). The default basic_user now also sees its user-group mates'
jobs, as its configuration says.

bug-1935: project_name and license_project are accepted job filters, so
xcecli jobs list -P works.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 06:56:57 +00:00
..
backend fix(apiserver): enforce self_ug job scopes and accept project filters (bug-1934, bug-1935) 2026-10-10 06:56:57 +00:00
cmd style(frontend): gofmt the apiserver and xcecli sources 2026-10-02 09:33:16 +00:00
common style(frontend): gofmt the apiserver and xcecli sources 2026-10-02 09:33:16 +00:00
config feat(job-array-one-based-index): clamp the apiserver array size limit (task 5.2) 2026-10-01 11:32:25 +00:00
controllers fix(apiserver): enforce self_ug job scopes and accept project filters (bug-1934, bug-1935) 2026-10-10 06:56:57 +00:00
docs Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
middleware test(apiserver): run TestLoadJobs only when a live server is given 2026-10-02 09:37:43 +00:00
models fix(apiserver): enforce self_ug job scopes and accept project filters (bug-1934, bug-1935) 2026-10-10 06:56:57 +00:00
router Init commit of jobs output/error message peek project. 2026-05-09 16:57:54 +08:00
services fix(apiserver): an accepted job is in the job store at once (bug-1894) 2026-09-30 04:23:10 +00:00
store fix(apiserver): enforce self_ug job scopes and accept project filters (bug-1934, bug-1935) 2026-10-10 06:56:57 +00:00
tools/encrypt Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
utils feat(job-array-one-based-index): row predicates in the apiserver query pipeline (task 5.3) 2026-10-01 11:35:05 +00:00
vendor build: make Go and Python builds fully offline (hermetic Nix build) 2026-09-03 12:38:49 +08:00
go.mod Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
go.sum Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
meson.build feat(eliminate-frontend-makefile): task 1.1 - Meson backend CGO test target 2026-09-03 13:17:06 +00:00
README.md Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00

(1) run server command:

cd cmd go run main.go

(2) run server with different log level: cd cmd go run main.go -level=debug

level options: info/debug/warn/error/fatal