Nats Native Behaviors + Peer is Stateless
This commit is contained in:
@@ -99,8 +99,10 @@ func GenericUpdateOne(set DBObject, id string, a Accessor, new DBObject) (DBObje
|
||||
}
|
||||
set = newSet
|
||||
r.UpToDate(a.GetUser(), a.GetPeerID(), false)
|
||||
r.Unsign()
|
||||
r.Sign()
|
||||
if a.GetPeerID() == r.GetCreatorID() {
|
||||
r.Unsign()
|
||||
r.Sign()
|
||||
}
|
||||
if a.ShouldVerifyAuth() && !r.VerifyAuth("update", a.GetRequest()) {
|
||||
return nil, 403, errors.New("you are not allowed to access :" + a.GetType().String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user