Skip to content

Commit

Permalink
Hide user-preferences API (RedHatInsights#2145)
Browse files Browse the repository at this point in the history
- These APIs are used internally, they are not really user friendly
   in any way.
   We should probably create other APIs if customers want to use these.
  • Loading branch information
josejulio authored Sep 22, 2023
1 parent b863d2d commit 2c613eb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public static class V2 extends UserConfigResource {
@Path("/notification-preference")
@Consumes(APPLICATION_JSON)
@Produces(TEXT_PLAIN)
@Tag(name = OApiFilter.PRIVATE)
@Transactional
public Response saveSettings(@Context SecurityContext sec, @NotNull @Valid SettingsValues values) {

Expand Down Expand Up @@ -157,6 +158,7 @@ private static String getUserName(SecurityContext sec) {
@GET
@Path("/notification-preference/{bundleName}/{applicationName}")
@Produces(APPLICATION_JSON)
@Tag(name = OApiFilter.PRIVATE)
public UserConfigPreferences getPreferences(
@Context SecurityContext sec,
@PathParam("bundleName") String bundleName,
Expand All @@ -181,6 +183,7 @@ public UserConfigPreferences getPreferences(
@GET
@Path("/notification-preference")
@Produces(APPLICATION_JSON)
@Tag(name = OApiFilter.PRIVATE)
public Response getSettingsSchema(@Context SecurityContext sec, @QueryParam("bundleName") String bundleName) {

final RhIdPrincipal principal = (RhIdPrincipal) sec.getUserPrincipal();
Expand Down

0 comments on commit 2c613eb

Please sign in to comment.