Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Linting
  • Loading branch information
Emyrk committed Feb 9, 2023
commit 22629e6b313e151f52b24f79e7f106cb3e5fedda
5 changes: 4 additions & 1 deletion coderd/rbac/astvalue.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ func (role Role) regoValue() ast.Value {
}

func (s Scope) regoValue() ast.Value {
r := s.Role.regoValue().(ast.Object)
r, ok := s.Role.regoValue().(ast.Object)
if !ok {
panic("developer error: role is not an object")
}
r.Insert(
ast.StringTerm("allow_list"),
ast.NewTerm(regoSliceString(s.AllowIDList...)),
Expand Down