Skip to content

Commit

Permalink
dont skip admins in our creation of collab structure
Browse files Browse the repository at this point in the history
  • Loading branch information
naknomum committed Dec 20, 2024
1 parent e971846 commit 2780d84
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/org/ecocean/Encounter.java
Original file line number Diff line number Diff line change
Expand Up @@ -3933,13 +3933,10 @@ public static void opensearchIndexPermissions() {
Shepherd myShepherd = new Shepherd("context0");
myShepherd.setAction("Encounter.opensearchIndexPermissions");
myShepherd.beginDBTransaction();
int nonAdminCt = 0;
// it seems as though user.uuid is *required* so we can trust that
try {
for (User user : myShepherd.getUsersWithUsername()) {
usernameToId.put(user.getUsername(), user.getId());
if (user.isAdmin(myShepherd)) continue;
nonAdminCt++;
List<Collaboration> collabsFor = Collaboration.collaborationsForUser(myShepherd,
user.getUsername());
if (Util.collectionIsEmptyOrNull(collabsFor)) continue;
Expand All @@ -3955,7 +3952,7 @@ public static void opensearchIndexPermissions() {
}
Util.mark("perm: user build done", startT);
System.out.println("opensearchIndexPermissions(): " + usernameToId.size() +
" total users; " + nonAdminCt + " non-admin; " + collab.size() + " have active collab");
" total users; " + collab.size() + " have active collab");
// now iterated over (non-public) encounters
int encCount = 0;
org.json.JSONObject updateData = new org.json.JSONObject();
Expand Down

0 comments on commit 2780d84

Please sign in to comment.