Revision b2454155
Added by Gilad Lekner over 5 years ago
app/controllers/notification_recipients_controller.rb | ||
---|---|---|
class NotificationRecipientsController < Api::V2::BaseController
|
||
include Foreman::Controller::Parameters::NotificationRecipient
|
||
skip_before_action :update_activity_time, :only => [:index]
|
||
before_action :require_login
|
||
before_action :find_resource, :only => [:update, :destroy]
|
||
|
||
def index
|
||
... | ... | |
|
||
private
|
||
|
||
def require_login
|
||
not_found unless SETTINGS[:login]
|
||
end
|
||
|
||
def find_resource
|
||
super
|
||
@notification_recipient.current_user? || not_found
|
Also available in: Unified diff
Fixes #24824 - Allow UI notifications when login is disabled