Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,21 +456,21 @@ const RetentionBody string = `[

const (
TestUser string = "alice"
dummyRole string = `[{"privilege": "editor"},{"privilege": "writer", "resource": {"stream": "app"}}]`
dummyRole string = `{"actions":[{"privilege": "editor"},{"privilege": "writer", "resource": {"stream": "app"}}], "roleType":"user"}`
)

const RoleEditor string = `[{"privilege": "editor"}]`
const RoleEditor string = `{"actions":[{"privilege": "editor"}],"roleType":"user"}`

func RoleWriter(stream string) string {
return fmt.Sprintf(`[{"privilege": "writer", "resource": {"stream": "%s"}}]`, stream)
return fmt.Sprintf(`{"actions":[{"privilege": "writer", "resource": {"stream": "%s"}}],"roleType":"user"}`, stream)
}

func RoleReader(stream string) string {
return fmt.Sprintf(`[{"privilege": "reader", "resource": {"stream": "%s"}}]`, stream)
return fmt.Sprintf(`{"actions":[{"privilege": "reader", "resource": {"stream": "%s"}}],"roleType":"user"}`, stream)
}

func Roleingestor(stream string) string {
return fmt.Sprintf(`[{"privilege": "ingestor", "resource": {"stream": "%s"}}]`, stream)
return fmt.Sprintf(`{"actions":[{"privilege": "ingestor", "resource": {"stream": "%s"}}],"roleType":"user"}`, stream)
}

func getTargetBody() string {
Expand Down