diff --git a/src/cls/ZPM/Owner.cls b/src/cls/ZPM/Owner.cls index 58558b2..0c0b35f 100644 --- a/src/cls/ZPM/Owner.cls +++ b/src/cls/ZPM/Owner.cls @@ -13,7 +13,7 @@ ClassMethod IsAuth() As %Status ClassMethod IsOwner(packageName As %String, action As %String = "") As %Status { Set owner = "" - &sql(SELECT TOP 1 owner INTO :owner FROM ZPM.Package WHERE name = :packageName ORDER BY publishTS) + &sql(SELECT TOP 1 owner INTO :owner FROM ZPM.Package WHERE name = :packageName ORDER BY publishTS DESC) If ( (owner'="") && (owner '= $Username) ){ Return $$$ERROR($$$GeneralError, "Invalid package owner") }