Skip to content

Commit

Permalink
admin cal see all orgs
Browse files Browse the repository at this point in the history
  • Loading branch information
holmbergius committed Nov 7, 2023
1 parent 50eab47 commit edc627f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/ecocean/FormUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ public static void setUpProjectIncrementalIdDropdown(Boolean isForIndividualOrOc
public static void setUpOrgDropdown(String fieldName, Boolean isForIndividualOrOccurrenceSearch, Properties encprops, JspWriter out, HttpServletRequest request, Shepherd myShepherd){
User usr = AccessControl.getUser(request, myShepherd);
if(usr != null){
List<Organization> orgsUserBelongsTo = usr.getOrganizations();
List<Organization> orgsUserBelongsTo = new ArrayList<Organization>();
if(request.isUserInRole("admin")) {orgsUserBelongsTo=myShepherd.getAllOrganizations();}
else {orgsUserBelongsTo = usr.getOrganizations();}
ArrayList<String> orgOptions = new ArrayList<String>();
ArrayList<String> orgIds = new ArrayList<String>();
for (int i = 0; i < orgsUserBelongsTo.size(); i++) { //TODO DRY up
Expand Down

0 comments on commit edc627f

Please sign in to comment.