Fix getAvailableDeliveryMethods for customers
This commit is contained in:
parent
857f69d7d5
commit
b25fd961d4
@ -432,9 +432,8 @@ public class NotificationController extends BaseController {
|
|||||||
notes = "Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications." +
|
notes = "Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications." +
|
||||||
SYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH)
|
SYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH)
|
||||||
@GetMapping("/notification/deliveryMethods")
|
@GetMapping("/notification/deliveryMethods")
|
||||||
@PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN')")
|
@PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')")
|
||||||
public Set<NotificationDeliveryMethod> getAvailableDeliveryMethods(@AuthenticationPrincipal SecurityUser user) throws ThingsboardException {
|
public Set<NotificationDeliveryMethod> getAvailableDeliveryMethods(@AuthenticationPrincipal SecurityUser user) throws ThingsboardException {
|
||||||
accessControlService.checkPermission(user, Resource.ADMIN_SETTINGS, Operation.READ);
|
|
||||||
return notificationCenter.getAvailableDeliveryMethods(user.getTenantId());
|
return notificationCenter.getAvailableDeliveryMethods(user.getTenantId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user