mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-11 05:41:52 +01:00
[REST Auth] Remove user access to things (#1807)
I can't think of a good reason why listing things or querying their status should be allowed for users. The things layer should only be of concern to admins IMHO. As noted here: https://community.openhab.org/t/oh3-will-list-all-your-things-even-if-you-are-not-logged-in/108006/3 passwords and other sensible information in configuration could end up being exposed without auth required. Signed-off-by: Yannick Schaus <github@schaus.net>
This commit is contained in:
parent
89767cee9e
commit
6ff65df7d2
@ -292,7 +292,7 @@ public class ThingResource implements RESTResource {
|
||||
}
|
||||
|
||||
@GET
|
||||
@RolesAllowed({ Role.USER, Role.ADMIN })
|
||||
@RolesAllowed({ Role.ADMIN })
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Operation(summary = "Get all available things.", responses = {
|
||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EnrichedThingDTO.class), uniqueItems = true))) })
|
||||
@ -518,7 +518,7 @@ public class ThingResource implements RESTResource {
|
||||
}
|
||||
|
||||
@GET
|
||||
@RolesAllowed({ Role.USER, Role.ADMIN })
|
||||
@RolesAllowed({ Role.ADMIN })
|
||||
@Path("/{thingUID}/status")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Operation(summary = "Gets thing status.", security = {
|
||||
|
Loading…
Reference in New Issue
Block a user