From bb6bc2387d58c737dbf92e73f8544bf39319dbd8 Mon Sep 17 00:00:00 2001 From: Lena Date: Sat, 1 Aug 2026 00:00:00 +0000 Subject: Enter git-forge A small self-hosted git forge: HTTP push and pull, cgit browsing, local and OIDC accounts, TOTP, scoped push tokens, per-repo permissions, issues, a wiki, and outbound mail. It does not reimplement git. git-http-backend and cgit run as CGI behind its own listener, which authorises every request before exec'ing either. One binary, one data directory, one listener: no database, no JavaScript, and state is JSON in a git repo with a working tree. --- templates/repo-settings.html | 122 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 templates/repo-settings.html (limited to 'templates/repo-settings.html') diff --git a/templates/repo-settings.html b/templates/repo-settings.html new file mode 100644 index 0000000..d90f744 --- /dev/null +++ b/templates/repo-settings.html @@ -0,0 +1,122 @@ +{{define "title"}}{{.Data.Path}} settings - {{.Site}}{{end}} +{{define "main"}} +{{$repo := .Data.Repo}} +

Settings

+ +{{if not .Data.Enrolled}} +
+This account has no authenticator, so it cannot change who may read or write +this repository, and cannot change grants. +Enrol one and come back. +
+{{end}} + +
+ +

+ + +

+{{template "knobs" $repo}} +

+ + +

+

+ + + +Needed only to move one of the three above: who may read or write outlives this +session, the way a grant does. A description or a label does not. + +

+

+
+ +

Grants

+

+read clones and browses a private repository. write adds pushing to it. admin +adds this page. A global admin holds admin everywhere without appearing here. +A push token can be minted for any repository an account can reach, and carries +the access that account already has there and nothing more. +

+

+Access handed out here outlives the session that hands it out, so changing a +grant asks for your own authenticator code as well. +

+ + +{{range $account, $level := $repo.Grants}} + + + + + +{{else}} + +{{end}} +
AccountLevel
{{template "who" $account}}{{$level}} +{{if $.Data.Enrolled}} +
+ + + + +
+{{end}} +
Nobody, so only global admins can reach it.
+ +{{if .Data.Enrolled}} +
+ +

+ + +

+
+Level + + + +
+

+ + +

+

+
+{{end}} + +{{if .Data.Delete}} +
+

Delete this repository

+

+This removes the repository, its issues, and its wiki together. There is no +undo and the history goes with it. Type {{.Data.Path}} to confirm, +and your own authenticator code, so that a session somebody else is sitting in +front of cannot do it. +

+
+ +

+ + +

+

+ + +

+

+
+
+{{end}} +{{end}} -- cgit v1.2.3