Skip to content

Commit c165e3d

Browse files
authored
fix: update keyvalue perms (#83)
1 parent 74e522f commit c165e3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nitric/keyvalue.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ import (
2525
type KvStorePermission string
2626

2727
const (
28-
KvStoreWrite KvStorePermission = "write"
29-
KvStoreRead KvStorePermission = "read"
28+
KvStoreSet KvStorePermission = "set"
29+
KvStoreGet KvStorePermission = "get"
3030
KvStoreDelete KvStorePermission = "delete"
3131
)
3232

33-
var KvStoreEverything []KvStorePermission = []KvStorePermission{KvStoreWrite, KvStoreRead, KvStoreDelete}
33+
var KvStoreEverything []KvStorePermission = []KvStorePermission{KvStoreSet, KvStoreGet, KvStoreDelete}
3434

3535
type KvStore interface {
3636
Allow(KvStorePermission, ...KvStorePermission) (keyvalue.Store, error)
@@ -80,9 +80,9 @@ func (m *manager) newKv(name string, permissions ...KvStorePermission) (keyvalue
8080
actions := []v1.Action{}
8181
for _, perm := range permissions {
8282
switch perm {
83-
case KvStoreRead:
83+
case KvStoreGet:
8484
actions = append(actions, v1.Action_KeyValueStoreRead)
85-
case KvStoreWrite:
85+
case KvStoreSet:
8686
actions = append(actions, v1.Action_KeyValueStoreWrite)
8787
case KvStoreDelete:
8888
actions = append(actions, v1.Action_KeyValueStoreDelete)

0 commit comments

Comments
 (0)