From 55e8a225cb3d9737381e781c3f19dea7ed8f5db5 Mon Sep 17 00:00:00 2001 From: Derek D Date: Wed, 20 Mar 2024 07:07:24 +0000 Subject: [PATCH] [#7380] Fix user_administration library to account for new API changes --- lib/administration/user/src/user_administration.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/administration/user/src/user_administration.cpp b/lib/administration/user/src/user_administration.cpp index 0cffd27b73..7a1990cb45 100644 --- a/lib/administration/user/src/user_administration.cpp +++ b/lib/administration/user/src/user_administration.cpp @@ -6,6 +6,7 @@ #include "irods/irods_query.hpp" #include "irods/query_builder.hpp" +#include "irods/version.hpp" namespace irods::experimental::administration::NAMESPACE_IMPL { @@ -102,10 +103,14 @@ namespace irods::experimental::administration::NAMESPACE_IMPL auto remove_group(RxComm& _comm, const group& _group) -> void { const auto zone = get_local_zone(_comm); - GeneralAdminInput input{}; input.arg0 = "rm"; - input.arg1 = "user"; +#ifdef IRODS_USER_ADMINISTRATION_ENABLE_SERVER_SIDE_API + input.arg1 = "group"; +#else + const auto version = irods::to_version(_comm.svrVersion->relVersion); + input.arg1 = (version && version.value() > irods::version{4, 3, 1}) ? "group" : "user"; +#endif input.arg2 = _group.name.data(); input.arg3 = zone.data();