From 9327024335b4464b80927cf201616636d8d0f991 Mon Sep 17 00:00:00 2001 From: Paul Sarando Date: Thu, 23 May 2024 19:26:54 -0700 Subject: [PATCH] CORE-1900 Update Tapis app sharing calls --- src/apps/service/apps/tapis/sharing.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apps/service/apps/tapis/sharing.clj b/src/apps/service/apps/tapis/sharing.clj index 18752eae..38a2293a 100644 --- a/src/apps/service/apps/tapis/sharing.clj +++ b/src/apps/service/apps/tapis/sharing.clj @@ -11,7 +11,9 @@ (if-not (ipg/user-source? (:source_id sharee)) (failure-fn "Sharing HPC apps with a group is not supported") (try+ - (.shareAppWithUser tapis (:id sharee) app-id level) + (if level + (.shareAppWithUser tapis (:id sharee) app-id level) + (.unshareAppWithUser tapis (:id sharee) app-id)) (success-fn) (catch [:error_code ce/ERR_UNAVAILABLE] {:keys [reason]} (log/error (:throwable &throw-context) "Tapis app listing timed out")