1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-12-03 23:28:05 +00:00

Make account system concurrent-safe and refactor it a little

This commit is contained in:
bouncepaw
2021-01-10 01:49:48 +05:00
parent 184aa1ae32
commit b1f33c872c
19 changed files with 385 additions and 358 deletions

View File

@@ -121,8 +121,7 @@ func (hop *HistoryOp) WithMsg(userMsg string) *HistoryOp {
// WithUser sets a user for the commit.
func (hop *HistoryOp) WithUser(u *user.User) *HistoryOp {
u = u.OrAnon()
if u.Group != user.UserAnon {
if u.Group != "anon" {
hop.name = u.Name
hop.email = u.Name + "@mycorrhiza"
}