Skip to content

Commit

Permalink
Merge pull request #1202 from US-CBP/release_candidate_1.1.4
Browse files Browse the repository at this point in the history
Release candidate 1.1.4
  • Loading branch information
originalname51 committed Jun 17, 2019
2 parents 3a4c133 + e21b12f commit da6c9d8
Show file tree
Hide file tree
Showing 18 changed files with 7,439 additions and 7,336 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private GtasSecurityConstants() {

public static final String PRIVILEGE_ADMIN = "hasAuthority('Admin')";

public static final String PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER = "hasAnyAuthority('Admin', 'View Flight And Passenger')";
public static final String PRIVILEGES_ADMIN_AND_VIEW_PASSENGER = "hasAnyAuthority('Admin', 'View Passenger')";

public static final String PRIVILEGES_ADMIN_AND_MANAGE_WATCH_LIST = "hasAnyAuthority('Admin', 'Manage Watch List')";

Expand All @@ -38,8 +38,10 @@ private GtasSecurityConstants() {
public static final String PRIVILEGES_ADMIN_AND_MANAGE_RULES_AND_MANAGE_WATCH_LIST = "hasAnyAuthority('Admin', 'Manage Rules', 'Manage Watch List')";

public static final String PRIVILEGES_ADMIN_AND_MANAGE_RULES_AND_MANAGE_WATCH_LIST_AND_MANAGE_QUERIES = "hasAnyAuthority('Admin', 'Manage Rules', 'Manage Watch List', 'Manage Queries')";

public static final String PRIVLEGES_ADMIN_AND_MANAGE_RULES_AND_MANAGE_WATCH_LIST_AND_MANAGE_QUERIES_AND_VIEW_PASSENGER = "hasAnyAuthority('Admin', 'Manage Rules', 'Manage Watch List', 'Manage Queries', 'View Passenger')";

public static final String ALL_PRIVS_AND_ONE_DAY = "hasAnyAuthority('Admin', 'Manage Rules', 'Manage Watch List', 'Manage Queries', 'One Day Lookout')";
public static final String ALL_PRIVS_AND_ONE_DAY = "hasAnyAuthority('Admin', 'Manage Rules', 'Manage Watch List', 'Manage Queries','View Passenger', 'One Day Lookout')";

public static final String PRIVILEGES_ADMIN_AND_MANAGE_RULES = "hasAnyAuthority('Admin', 'Manage Rules')";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@Cacheable
@Entity
@Table(name = "airportRestore", indexes = { @Index(columnList = "iata", name = "airportRestore_iata_index") })
@Table(name = "airport_restore", indexes = { @Index(columnList = "iata", name = "airportRestore_iata_index") })
public class AirportRestore extends BaseEntity {
public AirportRestore() { }
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@Cacheable
@Entity
@Table(name = "carrierRestore", indexes = { @Index(columnList = "iata", name = "carrierRestore_iata_index") })
@Table(name = "carrier_restore", indexes = { @Index(columnList = "iata", name = "carrierRestore_iata_index") })
public class CarrierRestore extends BaseEntity {
public CarrierRestore() { }
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@Cacheable
@Entity
@Table(name = "countryRestore", indexes = { @Index(columnList = "iso3", name = "countryRestore_iso3_index") })
@Table(name = "country_restore", indexes = { @Index(columnList = "iso3", name = "countryRestore_iso3_index") })
public class CountryRestore extends BaseEntity {
public CountryRestore() { }
@Column(length = 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

public interface CaseDispositionService {

@PreAuthorize(PRIVILEGES_ADMIN_AND_MANAGE_RULES_AND_MANAGE_WATCH_LIST_AND_MANAGE_QUERIES)
@PreAuthorize(PRIVLEGES_ADMIN_AND_MANAGE_RULES_AND_MANAGE_WATCH_LIST_AND_MANAGE_QUERIES_AND_VIEW_PASSENGER)
public CasePageDto findAll(CaseRequestDto dto);

@PreAuthorize(PRIVILEGES_ADMIN_AND_MANAGE_RULES_AND_MANAGE_WATCH_LIST_AND_MANAGE_QUERIES)
@PreAuthorize(PRIVLEGES_ADMIN_AND_MANAGE_RULES_AND_MANAGE_WATCH_LIST_AND_MANAGE_QUERIES_AND_VIEW_PASSENGER)
public CasePageDto findHitsDispositionByCriteria(CaseRequestDto dto);

@PreAuthorize(ALL_PRIVS_AND_ONE_DAY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package gov.gtas.services;

import static gov.gtas.constant.GtasSecurityConstants.PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER;
import static gov.gtas.constant.GtasSecurityConstants.PRIVILEGES_ADMIN_AND_VIEW_PASSENGER;
import gov.gtas.model.Document;
import gov.gtas.model.Flight;
import gov.gtas.model.Passenger;
Expand All @@ -28,7 +28,7 @@ public interface FlightService {

public Flight findById(Long id);

@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
//@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
public FlightsPageDto findAll(FlightsRequestDto dto);

public Flight getUniqueFlightByCriteria(String carrier,
Expand All @@ -39,7 +39,7 @@ public Flight getUniqueFlightByCriteria(String carrier,

public List<Flight> getFlightsByDates(Date startDate, Date endDate);

@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
//@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
public HashMap<Document, List<Flight>> getFlightsByPassengerNameAndDocument(
String firstName, String lastName, Set<Document> documents);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package gov.gtas.services;

import static gov.gtas.constant.GtasSecurityConstants.PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER;
import static gov.gtas.constant.GtasSecurityConstants.PRIVILEGES_ADMIN_AND_VIEW_PASSENGER;
import static gov.gtas.constant.GtasSecurityConstants.PRIVILEGES_ADMIN_AND_MANAGE_RULES_AND_MANAGE_WATCH_LIST_AND_MANAGE_QUERIES;
import gov.gtas.model.Disposition;
import gov.gtas.model.Flight;
Expand All @@ -31,10 +31,10 @@ public interface PassengerService {

Passenger update(Passenger passenger);

@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
Passenger findById(Long id);

@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
Passenger findByIdWithFlightPaxAndDocuments(Long paxId);

/*
Expand All @@ -43,11 +43,11 @@ public interface PassengerService {
*/


@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
List<Disposition> getPassengerDispositionHistory(Long passengerId,
Long flightId);

@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
void createDisposition(DispositionData disposition, User user);

void createDisposition(HitsSummary hit);
Expand All @@ -71,7 +71,7 @@ List<Disposition> getPassengerDispositionHistory(Long passengerId,
* @param request the request
* @return the passengers by criteria
*/
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
PassengersPageDto getPassengersByCriteria(Long flightId,
PassengersRequestDto request);

Expand All @@ -86,16 +86,16 @@ PassengersPageDto getPassengersByCriteria(Long flightId,
* @param docExpirationDate the doc expiration date
* @return the travel history
*/
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
List<Flight> getTravelHistory(Long pId, String docNum, String docIssuCountry, Date docExpDate);

@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
List<Flight> getTravelHistoryByItinerary(Long pnrId, String pnrRef);

@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
List<Flight> getTravelHistoryNotByItinerary(Long pId, Long pnrId, String pnrRef);

@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_FLIGHT_PASSENGER)
@PreAuthorize(PRIVILEGES_ADMIN_AND_VIEW_PASSENGER)
List<Passenger> getBookingDetailHistoryByPaxID(Long pId);

Set<Flight> getAllFlights(Long id);
Expand Down
Loading

0 comments on commit da6c9d8

Please sign in to comment.