Update try

This commit is contained in:
mr
2026-03-02 15:46:05 +01:00
parent cb3771c17a
commit 44812309db
19 changed files with 64 additions and 80 deletions

View File

@@ -150,17 +150,6 @@ func (abs *AbstractInstanciatedResource[T]) SetAllowedInstances(request *tools.A
abs.Instances = VerifyAuthAction(abs.Instances, request, instanceID...)
}
func (d *AbstractInstanciatedResource[T]) Trim() {
d.Type = d.GetType()
if ok, _ := utils.IsMySelf(d.CreatorID, (&peer.Peer{}).GetAccessor(&tools.APIRequest{
Admin: true,
})); !ok {
for _, instance := range d.Instances {
instance.ClearPeerGroups()
}
}
}
func (abs *AbstractInstanciatedResource[T]) VerifyAuth(callName string, request *tools.APIRequest) bool {
return len(VerifyAuthAction(abs.Instances, request)) > 0 || abs.AbstractObject.VerifyAuth(callName, request)
}