diff --git a/server/src/main/java/com/objectcomputing/checkins/services/memberprofile/anniversaryreport/AnniversaryReportServicesImpl.java b/server/src/main/java/com/objectcomputing/checkins/services/memberprofile/anniversaryreport/AnniversaryReportServicesImpl.java index c58e34acc..4ea9ac7fe 100644 --- a/server/src/main/java/com/objectcomputing/checkins/services/memberprofile/anniversaryreport/AnniversaryReportServicesImpl.java +++ b/server/src/main/java/com/objectcomputing/checkins/services/memberprofile/anniversaryreport/AnniversaryReportServicesImpl.java @@ -3,7 +3,6 @@ import com.objectcomputing.checkins.exceptions.PermissionException; import com.objectcomputing.checkins.services.memberprofile.MemberProfile; import com.objectcomputing.checkins.services.memberprofile.MemberProfileServices; -import com.objectcomputing.checkins.services.memberprofile.currentuser.CurrentUserServices; import io.micronaut.core.annotation.Nullable; import jakarta.inject.Singleton; @@ -18,20 +17,13 @@ public class AnniversaryReportServicesImpl implements AnniversaryServices { private final MemberProfileServices memberProfileServices; - private final CurrentUserServices currentUserServices; - public AnniversaryReportServicesImpl(MemberProfileServices memberProfileServices, - CurrentUserServices currentUserServices) { + public AnniversaryReportServicesImpl(MemberProfileServices memberProfileServices) { this.memberProfileServices = memberProfileServices; - this.currentUserServices = currentUserServices; } @Override public List findByValue(@Nullable String[] months) { - if (!currentUserServices.isAdmin()) { - throw new PermissionException("You do not have permission to access this resource."); - } - List memberProfileAll = new ArrayList<>(); Set memberProfiles = memberProfileServices.findByValues(null, null, null, null, null, null, false); diff --git a/server/src/main/java/com/objectcomputing/checkins/services/memberprofile/birthday/BirthDayServicesImpl.java b/server/src/main/java/com/objectcomputing/checkins/services/memberprofile/birthday/BirthDayServicesImpl.java index b8d1e756c..bea821aa5 100644 --- a/server/src/main/java/com/objectcomputing/checkins/services/memberprofile/birthday/BirthDayServicesImpl.java +++ b/server/src/main/java/com/objectcomputing/checkins/services/memberprofile/birthday/BirthDayServicesImpl.java @@ -3,7 +3,6 @@ import com.objectcomputing.checkins.exceptions.PermissionException; import com.objectcomputing.checkins.services.memberprofile.MemberProfile; import com.objectcomputing.checkins.services.memberprofile.MemberProfileServices; -import com.objectcomputing.checkins.services.memberprofile.currentuser.CurrentUserServices; import jakarta.inject.Singleton; import java.time.LocalDate; @@ -15,19 +14,13 @@ public class BirthDayServicesImpl implements BirthDayServices{ private final MemberProfileServices memberProfileServices; - private final CurrentUserServices currentUserServices; - public BirthDayServicesImpl(MemberProfileServices memberProfileServices, CurrentUserServices currentUserServices) { + public BirthDayServicesImpl(MemberProfileServices memberProfileServices) { this.memberProfileServices = memberProfileServices; - this.currentUserServices = currentUserServices; } @Override public List findByValue(String[] months, Integer[] daysOfMonth) { - if (!currentUserServices.isAdmin()) { - throw new PermissionException("You do not have permission to access this resource."); - } - Set memberProfiles = memberProfileServices.findByValues(null, null, null, null, null, null, false); List memberProfileAll = new ArrayList<>(memberProfiles); if (months != null) {