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
@ -35,20 +35,22 @@ class UserMailer < ApplicationMailer
|
||||
mail to: user.email, subject: t('reset_password.subtitle')
|
||||
end
|
||||
|
||||
def user_promoted(user, url, image, color)
|
||||
def user_promoted(user, role, url, image, color)
|
||||
@url = url
|
||||
@admin_url = url + "admins"
|
||||
@image = image
|
||||
@color = color
|
||||
mail to: user.email, subject: t('mailer.user.promoted.subtitle')
|
||||
@role = role
|
||||
mail to: user.email, subject: t('mailer.user.promoted.subtitle', role: role)
|
||||
end
|
||||
|
||||
def user_demoted(user, url, image, color)
|
||||
def user_demoted(user, role, url, image, color)
|
||||
@url = url
|
||||
@root_url = url
|
||||
@image = image
|
||||
@color = color
|
||||
mail to: user.email, subject: t('mailer.user.demoted.subtitle')
|
||||
@role = role
|
||||
mail to: user.email, subject: t('mailer.user.demoted.subtitle', role: role)
|
||||
end
|
||||
|
||||
def invite_email(name, email, url, image, color)
|
||||
|
Reference in New Issue
Block a user