mirror of https://github.com/status-im/consul.git
fix: Destroying a session that doesn't exist returns status cod… (#6905)
fix #6840
This commit is contained in:
parent
096326d2b3
commit
2630a949f7
|
@ -58,7 +58,7 @@ func (s *Session) Apply(args *structs.SessionRequest, reply *string) error {
|
|||
return fmt.Errorf("Session lookup failed: %v", err)
|
||||
}
|
||||
if existing == nil {
|
||||
return fmt.Errorf("Unknown session %q", args.Session.ID)
|
||||
return nil
|
||||
}
|
||||
if authz.SessionWrite(existing.Node, &authzContext) != acl.Allow {
|
||||
return acl.ErrPermissionDenied
|
||||
|
|
Loading…
Reference in New Issue