forked from External/greenlight
GRN2-176: Create a role editor that allows admins to specify what permissions each role has (#709)
* Add roles editor * Add colour selection ability to roles * Add ability to assign roles to users in the UI * Remove rolify and replace it with our own custom roles implemenation * - Fix all existing roles functionality - Fix super admins * Fix bugs with new customers not have default roles * Add can't create room setting * Code improvements * Fix migration * Add tests for new methods * Translate reserved role names * Pull roles from saml/ldap * Fix rspec * Fix scrutinizer issues * Fix email promoted/demoted tests * Apply comments * Redirect directly to the main room * Add comments
This commit is contained in:
committed by
Jesus Federico
parent
02b342b157
commit
4fc1714db8
@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserMailerPreview < ActionMailer::Preview
|
||||
def initialize
|
||||
def initialize(_params)
|
||||
@logo = "https://raw.githubusercontent.com/bigbluebutton/greenlight/master/app/assets/images/logo_with_text.png"
|
||||
@color = "#467fcf"
|
||||
end
|
||||
@ -53,19 +53,21 @@ class UserMailerPreview < ActionMailer::Preview
|
||||
# http://localhost:3000/rails/mailers/user_mailer/user_promoted
|
||||
def user_promoted
|
||||
user = User.first
|
||||
role = Role.first.name
|
||||
url = "http://example.com"
|
||||
logo_image = "https://raw.githubusercontent.com/bigbluebutton/greenlight/master/app/assets/images/logo_with_text.png"
|
||||
user_color = "#467fcf"
|
||||
UserMailer.user_promoted(user, url, logo_image, user_color)
|
||||
UserMailer.user_promoted(user, role, url, logo_image, user_color)
|
||||
end
|
||||
|
||||
# Preview this email at
|
||||
# http://localhost:3000/rails/mailers/user_mailer/user_demoted
|
||||
def user_demoted
|
||||
user = User.first
|
||||
role = Role.first.name
|
||||
url = "http://example.com"
|
||||
logo_image = "https://raw.githubusercontent.com/bigbluebutton/greenlight/master/app/assets/images/logo_with_text.png"
|
||||
user_color = "#467fcf"
|
||||
UserMailer.user_demoted(user, url, logo_image, user_color)
|
||||
UserMailer.user_demoted(user, role, url, logo_image, user_color)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user