variables: fix access to variables for poststop tasks (#19270)
In the recent auth refactor, we accidentally fixed a bug where poststop tasks would not get access to Variables. Fix this same bug for backports by ensuring that we use client-terminal status and not server-terminal status to enforce access.
This commit is contained in:
parent
c7086d5a96
commit
413728fcde
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
variables: Fixed a bug where poststop tasks were not allowed access to Variables
|
||||||
|
```
|
|
@ -247,7 +247,7 @@ func (s *Server) VerifyClaim(token string) (*structs.IdentityClaims, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// the claims for terminal allocs are always treated as expired
|
// the claims for terminal allocs are always treated as expired
|
||||||
if alloc.TerminalStatus() {
|
if alloc.ClientTerminalStatus() {
|
||||||
return nil, fmt.Errorf("allocation is terminal")
|
return nil, fmt.Errorf("allocation is terminal")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue