Adjust + Test
This commit is contained in:
@@ -34,6 +34,8 @@ func GenericStoreOne(data DBObject, a Accessor) (DBObject, int, error) {
|
||||
data.SetID(data.GetID())
|
||||
data.StoreDraftDefault()
|
||||
data.UpToDate(a.GetUser(), a.GetPeerID(), true)
|
||||
data.Unsign()
|
||||
data.Sign()
|
||||
f := dbs.Filters{
|
||||
Or: map[string][]dbs.Filter{
|
||||
"abstractresource.abstractobject.name": {{
|
||||
@@ -97,6 +99,8 @@ 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.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