Revert "Fix context for creating and updating users"
This reverts commit 70981b6dae
.
Change-Id: Id22763dea0e085e245794dd5dd8b8f7e14c7562f
Reviewed-on: https://gerrit.instructure.com/57672
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
This commit is contained in:
parent
5ff6d70097
commit
c85864c543
|
@ -1961,8 +1961,8 @@ class UsersController < ApplicationController
|
|||
|
||||
def require_self_registration
|
||||
get_context
|
||||
@context ||= @domain_root_account || Account.default unless @context.is_a?(Account)
|
||||
@context ||= @context.root_account
|
||||
@context = @domain_root_account || Account.default unless @context.is_a?(Account)
|
||||
@context = @context.root_account
|
||||
unless @context.grants_right?(@current_user, session, :manage_user_logins) ||
|
||||
@context.self_registration_allowed_for?(params[:user] && params[:user][:initial_enrollment_type])
|
||||
flash[:error] = t('no_self_registration', "Self registration has not been enabled for this account")
|
||||
|
|
Loading…
Reference in New Issue