Native organizations and external projects #30
No reviewers
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
argus/backend!30
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/26-native-orgs-external-projects"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #26
Part of the server monitoring plan (phase 1.1): Argus can now hold reports that don't come from a Forgejo repo.
Changes
Organization.kind(forgejo|native) andProject.kind(forgejo|external), with migrations (existing rows default toforgejo).forgejo_owner/forgejo_reporemain the slugs, so/:owner/:repoURLs, badges and upload tokens work unchanged.POST /api/organizations/withkind=native: Argus admins only (Django superusers for now,argus-adminsgroup in #27), slug validated, never adopts an existing organization. A Forgejo organization can't take a native slug.POST /api/projects/withkind=external: admin on the (existing) organization, slug validated. A Forgejo project can't be created in a native organization.kindis read-only afterwards.apps.accounts.access: the single place deciding access (Forgejo repo permission, Forgejo org permission for external projects of a Forgejo org, Argus admin for native orgs). Used by all views, event serializers/views, deliveries and the bigb scope. Test mocks now targetapps.accounts.access.has_at_least/has_org_level.cleanup_pr, Forgejo webhook (202 no-op), source view (404), project discovery (empty list); uploads withref_kind=prare refused (400).apps/reports/test_external.py.Checks
pytest (194 passed), pylint 10/10, autopep8, bandit clean.
Follow-ups (stacked PRs)
#27 Authentik groups → #28 sources/JSON/dedup → #29 stale trigger → #23 → #21.
🤖 Generated with Claude Code
https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
📊 Rapports Argus pour cette PR