Skip to content

Commit

Permalink
Merge pull request #66 from ianmcorvidae/core-2004
Browse files Browse the repository at this point in the history
CORE-2004: filter the list of members by existence in iRODS rather than erroring
  • Loading branch information
ianmcorvidae authored Jul 23, 2024
2 parents 6750777 + c83fbd4 commit 12d7a10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/data_info/services/groups.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
(validators/user-exists cm user)
(validators/user-is-group-admin cm user)
(validators/group-exists cm group-name)
(validators/all-users-exist cm members)
;; instead of this, we filter the list by extant users, so the group can
;; still be updated if a few don't exist in irods
;(validators/all-users-exist cm members)
(let [current-members (set (users/list-group-members cm group-name))
desired-members (set (map di-users/ensure-qualified members))
desired-members (set (map di-users/ensure-qualified (filter users/user-exists? members)))

members-to-add (cset/difference desired-members current-members)
members-to-remove (cset/difference current-members desired-members)
Expand Down

0 comments on commit 12d7a10

Please sign in to comment.