Skip to content

Commit

Permalink
fix: allow admin for anon-access
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Apr 7, 2022
1 parent 3800161 commit 06dc749
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ name: Soft Serve
host: %s
port: %d
# Access level for anonymous users. Options are: read-write, read-only and
# no-access.
# Access level for anonymous users. Options are: admin-access, read-write,
# read-only, and no-access.
anon-access: %s
# You can grant read-only access to users without private keys. Any password
Expand Down
2 changes: 2 additions & 0 deletions internal/config/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ func (cfg *Config) accessForKey(repo string, pk ssh.PublicKey) gm.AccessLevel {
return gm.ReadOnlyAccess
case "read-write":
return gm.ReadWriteAccess
case "admin-access":
return gm.AdminAccess
default:
return gm.NoAccess
}
Expand Down

0 comments on commit 06dc749

Please sign in to comment.