Fixed AuthHandler to not require write permission on user

graph-rework-2
noah metz 2023-07-23 19:46:18 -06:00
parent 054fe3c0ec
commit 63fb5e3187
2 changed files with 2 additions and 2 deletions

@ -212,7 +212,7 @@ func AuthHandler(ctx *Context, server *GQLThread) func(http.ResponseWriter, *htt
}, },
new_user.ID(): LockInfo{ new_user.ID(): LockInfo{
Node: &new_user, Node: &new_user,
Resources: []string{""}, Resources: nil,
}, },
}), func(context *StateContext) error { }), func(context *StateContext) error {
server.Users[key_id] = &new_user server.Users[key_id] = &new_user

@ -143,7 +143,7 @@ func TestGQLDBLoad(t * testing.T) {
} }
func TestGQLAuth(t * testing.T) { func TestGQLAuth(t * testing.T) {
ctx := logTestContext(t, []string{"policy"}) ctx := logTestContext(t, []string{"test", "gql", "policy"})
key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
fatalErr(t, err) fatalErr(t, err)