Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F904993
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 29, 7:02 PM
Size
2 KB
Mime Type
text/x-diff
Expires
Sun, Aug 31, 7:02 PM (20 h, 22 m)
Engine
blob
Format
Raw Data
Handle
252376
Attached To
rARCHIVING archiving
View Options
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 37575fe..92f9287 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -1,35 +1,36 @@
class UserMailer < ActionMailer::Base
default from: Archiving.settings[:default_sender]
# Notifies the host's owners that the host has been verified by an admin
# and is now ready to be configured
#
# @param user_emails[Array] the owners' emails
# @param host[String] the host's FQDN
def notify_for_verification(user_emails, host)
@host = host
s = "[Archiving] Host #{host} verification"
mail(to: user_emails, subject: s)
end
# Notifies the user that another user has requested that he should be able to
# manage the given client's backups
#
# @param email[String] the user's email
# @param invitation[Invitation] the target host
def notify_for_invitation(email, invitation)
@invitation = invitation
subject = "[Archiving] Invitation to manage #{@invitation.host.name}'s backups"
mail(to: email, subject: subject)
end
- # Notifies admin about a new host that needs verification
+ # Notifies admins about a new host that needs verification
#
# @param user[User] the user that created the host
# @param host[String] the host's FQDN
def notify_admin(user, host)
+ admin_emails = User.admin.pluck(:email)
@user = user
@host = host
- mail(to: Archiving.settings[:admin_email], subject: 'New host pending verification')
+ mail(to: admin_emails, subject: 'New host pending verification')
end
end
diff --git a/config/initializers/00_settings.rb b/config/initializers/00_settings.rb
index e213d1f..775871e 100644
--- a/config/initializers/00_settings.rb
+++ b/config/initializers/00_settings.rb
@@ -1,18 +1,17 @@
bacula_yml = YAML.load_file(Rails.root.join('config', 'bacula.yml'))[Rails.env].symbolize_keys
Archiving.settings director_name: bacula_yml[:director]
Archiving.settings default_pool: bacula_yml[:pool]
Archiving.settings quota_checker: bacula_yml[:quota_checker]
Archiving.settings vima_oauth_enabled: true
Archiving.settings institutional_authentication_enabled: true
Archiving.settings okeanos_authentication_enabled: false
Archiving.settings default_sender: 'admin@archiving.grnet.gr'
-Archiving.settings admin_email: 'admin@archiving.grnet.gr'
Archiving.settings temp_db_retention: 3.days
Archiving.settings skip_host_fetch_time_period: 1.month
Archiving.settings mail_settings: YAML::load(File.open("#{Rails.root}/config/mailer.yml"))[Rails.env].symbolize_keys
Archiving.settings client_quota: 100.megabytes
Event Timeline
Log In to Comment