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/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

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

Identify accounts by their registered name

62576fa8157d431dcf2d360f3ebe481de77bda03 · Keenan Nemetz · 14d ago · parent 642e5994

Identify accounts by their registered name

Drop the internal account id and display name. Users, keys, passkeys,
invites, sessions, ACL entries, approvals, locks and CI records now all
use the registered name as the single identity.

The roster migrates in place: old id-keyed tables are rebuilt around the
name, and access-rule/lock references are rewritten through the same
mapping. Display-name editing and whoami --id are removed.

server/web/issues.go +5−5

@@ -233,7 +233,7 @@ type issuePageView struct {
233 233 func (w *Web) issueSidebar(r *http.Request, m *repo.Meta, iss *metadata.Issue, title, errMsg string) issueSidebarView {
234 234 acl, _ := m.ACL()
235 235 pr := w.principal(r)
236 canManage := pr != nil && acl != nil && (acl.CanTriage(pr.account.ID) || iss.Author == pr.account.Name)
236 canManage := pr != nil && acl != nil && (acl.CanTriage(pr.account.Name) || iss.Author == pr.account.Name)
237 237 _ = w.Index.EnsureIssues(m)
238 238 labels, _ := w.Index.Labels(m.ID)
239 239 assignable := mergeNames(w.assignableAccounts(m), iss.Assignees)
@@ -347,7 +347,7 @@ func (w *Web) issueThread(r *http.Request, m *repo.Meta, iss *metadata.Issue, er
347 347 func (w *Web) markIssueCommentActions(r *http.Request, m *repo.Meta, issueID string, comments []issueCommentView, canDiscuss bool) {
348 348 pr := w.principal(r)
349 349 acl, _ := m.ACL()
350 admin := pr != nil && acl != nil && acl.RoleFor(pr.account.ID).AtLeast(access.Admin)
350 admin := pr != nil && acl != nil && acl.RoleFor(pr.account.Name).AtLeast(access.Admin)
351 351 csrf := ""
352 352 if pr != nil {
353 353 csrf = pr.session.CSRF
@@ -420,7 +420,7 @@ func (w *Web) NewIssuePage(rw http.ResponseWriter, r *http.Request) {
420 420 return
421 421 }
422 422 acl, err := m.ACL()
423 if err != nil || !acl.CanDiscuss(pr.account.ID) {
423 if err != nil || !acl.CanDiscuss(pr.account.Name) {
424 424 http.Error(rw, "you do not have permission to file issues here", http.StatusForbidden)
425 425 return
426 426 }
@@ -465,8 +465,8 @@ func (w *Web) assignableAccounts(m *repo.Meta) []string {
465 465 return nil
466 466 }
467 467 var names []string
468 for _, acct := range snap.ByID {
469 if acct.Active() && acl.Can(acct.ID, access.Read) {
468 for _, acct := range snap.ByName {
469 if acct.Active() && acl.Can(acct.Name, access.Read) {
470 470 names = append(names, acct.Name)
471 471 }
472 472 }