Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Add instance-wide roles and refine access UI

5b814e9958090cfd1fa826efb2d375bf613547c1 · Keenan Nemetz · 14d ago · parent 9579c1f9

Add instance-wide roles and refine access UI

Instance roles now live on accounts, apply to public repositories, and the Admin role is the unified instance-admin permission with access to every repository. Repository ACLs can raise an instance role but not lower it.

Adds role assignment to the users UI and CLI, open-registration role config, a reusable role picker, and separates adding a repository account from saving access rules.

docs/configuration.md +14−10

@@ -53,6 +53,7 @@ vole admin user list
53 53 | `acme_directory_url` | Let's Encrypt production | ACME directory; use the staging URL or a private CA while testing |
54 54 | `dev_login` | empty | Development only: sign loopback browser requests in as this account |
55 55 | `open_registration` | `false` | Let anyone create an account by registering a passkey; requires `public_url` to be HTTPS |
56 | `open_registration_role` | `"none"` | Instance-wide role a self-registered account gets; applies to public repositories, `admin` is refused |
56 57 | `max_blob_bytes` | `104857600` (100 MiB) | Largest single file accepted in a push |
57 58 | `receive_max_bytes` | `1073741824` (1 GiB) | Largest whole push Vole will accept |
58 59 | `lfs_object_max_bytes` | `2147483648` (2 GiB) | Largest single LFS object |
@@ -153,21 +154,24 @@ By default only an administrator can create an account. Set
153 154 ```toml
154 155 public_url = "https://forge.example.com"
155 156 open_registration = true
157 open_registration_role = "contribute"
156 158 ```
157 159
158 The setting has no effect unless `public_url` is HTTPS. New accounts start with
159 no repository-specific access: each repository's default role still applies. An
160 open-source project that wants outside contributions can publish the repository
161 and set its default role to `contributor`:
160 The setting has no effect unless `public_url` is HTTPS. New accounts have no
161 repository-specific access, but `open_registration_role` gives them an
162 instance-wide role that applies to every public repository. `contribute` lets
163 them read, discuss, and push to their own `refs/heads/contrib/<name>/` namespace
164 without being added to each repository. It does not open private repositories;
165 `admin` is refused for self-registration. A registered account can add its own
166 SSH key from **Account**, so it can push. There is no email verification;
167 registration is a deliberate policy choice, not a safe default.
168
169 A repository can still be published for anonymous readers with:
162 170
163 171 ```sh
164 vole admin acl default demo contributor
172 vole admin acl default demo read
165 173 ```
166 174
167 A registered account can add its own SSH key from **Account**, so it can push to
168 the contributor namespace without an administrator. There is no email
169 verification; registration is a deliberate policy choice, not a safe default.
170
171 175 ## Development login
172 176
173 177 Browsers require HTTPS for passkeys, which makes a local `http://127.0.0.1:8080`
@@ -212,7 +216,7 @@ connection intact.
212 216
213 217 | Path | What it is |
214 218 |---|---|
215 | `data/users.db` | Accounts, names, SSH keys, passkeys, enrollment invites, browser sessions, instance admins, access rules, and locks. This is the main user database. Session and invite tokens are stored only as hashes. |
219 | `data/users.db` | Accounts, names, instance roles, SSH keys, passkeys, enrollment invites, browser sessions, access rules, and locks. This is the main user database. Session and invite tokens are stored only as hashes. |
216 220 | `data/repos/` | Your Git repositories. |
217 221 | `data/index.db` | A rebuildable search index. |
218 222 | `data/runs.db` | The CI queue, finished-run index, and contributor-branch CI approvals. Partly rebuildable; deleting it loses pending work and approvals. |