We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents de7de6e + c1f8945 commit 4c86e44Copy full SHA for 4c86e44
coderd/authz/action.go
@@ -4,8 +4,8 @@ package authz
4
type Action string
5
6
const (
7
- ReadAction = "read"
8
- WriteAction = "write"
9
- ModifyAction = "modify"
10
- DeleteAction = "delete"
+ ActionRead = "read"
+ ActionWrite = "write"
+ ActionModify = "modify"
+ ActionDelete = "delete"
11
)
coderd/authz/authztest/object.go
@@ -0,0 +1,16 @@
1
+package authztest
2
+
3
+import "github.com/coder/coder/coderd/authz"
+func Objects(pairs ...[]string) []authz.Object {
+ objs := make([]authz.Object, 0, len(pairs))
+ for _, p := range pairs {
+ objs = append(objs, &authz.ZObject{
+ ObjectID: PermObjectID,
+ Owner: p[0],
+ OrgOwner: p[1],
12
+ ObjectType: PermObjectType,
13
+ })
14
+ }
15
+ return objs
16
+}
0 commit comments