diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index 19fc8ec..81132b9 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -9,6 +9,11 @@ class NotificationMailer < ApplicationMailer def remotestorage_auth_created @user = params[:user] @auth = params[:auth] + @permissions = @auth.permissions.map do |p| + access = p.split(":")[1] == 'r' ? 'read' : 'read/write' + directory = p.split(':')[0] == '' ? 'all folders and files' : p.split(':')[0] + "#{access} #{directory}" + end @subject = "New app connected to your storage" mail to: @user.email, subject: @subject end diff --git a/app/views/notification_mailer/remotestorage_auth_created.text.erb b/app/views/notification_mailer/remotestorage_auth_created.text.erb index cc8cd31..61338f3 100644 --- a/app/views/notification_mailer/remotestorage_auth_created.text.erb +++ b/app/views/notification_mailer/remotestorage_auth_created.text.erb @@ -15,9 +15,9 @@ Have fun! --- You can disable email notifications for new app authorizations in your account settings: -<%= setting_path(:remotestorage) %> - +<%= setting_url(:remotestorage) %> <% if Setting.discourse_enabled %> + If you have any questions, please visit our community forums: <%= Setting.discourse_public_url %> <% end %>