Skip to content

Commit

Permalink
fix: update keyvalue perms (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
davemooreuws authored Jun 27, 2024
1 parent 74e522f commit c165e3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nitric/keyvalue.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
type KvStorePermission string

const (
KvStoreWrite KvStorePermission = "write"
KvStoreRead KvStorePermission = "read"
KvStoreSet KvStorePermission = "set"
KvStoreGet KvStorePermission = "get"
KvStoreDelete KvStorePermission = "delete"
)

var KvStoreEverything []KvStorePermission = []KvStorePermission{KvStoreWrite, KvStoreRead, KvStoreDelete}
var KvStoreEverything []KvStorePermission = []KvStorePermission{KvStoreSet, KvStoreGet, KvStoreDelete}

type KvStore interface {
Allow(KvStorePermission, ...KvStorePermission) (keyvalue.Store, error)
Expand Down Expand Up @@ -80,9 +80,9 @@ func (m *manager) newKv(name string, permissions ...KvStorePermission) (keyvalue
actions := []v1.Action{}
for _, perm := range permissions {
switch perm {
case KvStoreRead:
case KvStoreGet:
actions = append(actions, v1.Action_KeyValueStoreRead)
case KvStoreWrite:
case KvStoreSet:
actions = append(actions, v1.Action_KeyValueStoreWrite)
case KvStoreDelete:
actions = append(actions, v1.Action_KeyValueStoreDelete)
Expand Down

0 comments on commit c165e3d

Please sign in to comment.