Revision 8192dbbb
Added by Stephen Benjamin over 9 years ago
app/services/foreman/access_permissions.rb | ||
---|---|---|
end
|
||
end
|
||
|
||
map.security_block :mail_notifications do |map|
|
||
map.permission :view_mail_notifications, { :mail_notifications => [:index, :auto_complete_search, :show],
|
||
:"api/v2/mail_notifications" => [:index, :show] }
|
||
end
|
||
|
||
map.security_block :media do |map|
|
||
map.permission :view_media, {:media => [:index, :show, :auto_complete_search],
|
||
:"api/v1/media" => [:index, :show],
|
Also available in: Unified diff
fixes #7586, #7734, #7172 - user preferences for receiving mail notifications
Adds a framework for user-selectable mail notifications. The work is
still done in ActionMailer classes and launch by rake in cron, however a
wrapper called MailNotification is used to provide RBAC and make the
association with users.
Plugins may seed their own mail notifications, see
db/seeds.d/16-mail-notifications.rb for an example.
Authors:
Shlomi Zadok <szadok@redhat.com>
Stephen Benjamin <stephen@redhat.com>
(cherry picked from commit 3a36bdf6179cfb3207af623584c021addb674ffb)