GRN2-6: Added the ability for admins to specify registration method (#520)

* Added the ability to invite users

* Small bug fix

* Added the ability to approve/decline users

* Small bug fixes

* More bug fixes

* More minor changes

* Final changes
This commit is contained in:
farhatahmad
2019-05-17 16:26:49 -04:00
committed by Jesus Federico
parent adf4b68008
commit 720dac6012
37 changed files with 928 additions and 101 deletions

View File

@ -1,13 +1,18 @@
# frozen_string_literal: true
class UserMailerPreview < ActionMailer::Preview
def initialize
@logo = "https://raw.githubusercontent.com/bigbluebutton/greenlight/master/app/assets/images/logo_with_text.png"
@color = "#467fcf"
end
# Preview this email at
# http://localhost:3000/rails/mailers/user_mailer/password_reset
def password_reset
user = User.first
user.reset_token = User.new_token
url = "http://example.com" + "/password_resets/" + user.reset_token + "/edit?email=" + user.email
UserMailer.password_reset(user, url)
UserMailer.password_reset(user, url, @logo, @color)
end
# Preview this email at
@ -15,6 +20,19 @@ class UserMailerPreview < ActionMailer::Preview
def verify_email
user = User.first
url = "http://example.com" + "/u/verify/confirm/" + user.uid
UserMailer.verify_email(user, url)
UserMailer.verify_email(user, url, @logo, @color)
end
# Preview this email at
# http://localhost:3000/rails/mailers/user_mailer/invite_email
def invite_email
UserMailer.invite_email("Example User", "from@example.com", "http://example.com/signup", @logo, @color)
end
# Preview this email at
# http://localhost:3000/rails/mailers/user_mailer/approve_user
def approve_user
user = User.first
UserMailer.approve_user(user, "http://example.com/", @logo, @color)
end
end