mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 10:41:25 +08:00
DEV: Introduce Auth::Result API for overrides_* (#15378)
This allows authenticators to instruct the Auth::Result to override attributes without using the general site settings. This provides an easy migration path for auth plugins which offer their own "overrides email", "overrides username" or "overrides name" settings. With this new api, they can set `overrides_*` on the result object, and the attribute will be overriden regardless of the general site setting. ManagedAuthenticator is updated to use this new API. Plugins which consume ManagedAuthenticator will instantly take advantage of this change.
This commit is contained in:
@ -411,7 +411,7 @@ RSpec.describe Users::OmniauthCallbacksController do
|
||||
expect(user.confirm_password?("securepassword")).to eq(false)
|
||||
end
|
||||
|
||||
it "should update name/username/email when sso_overrides is enabled" do
|
||||
it "should update name/username/email when SiteSetting.auth_overrides_* are enabled" do
|
||||
SiteSetting.email_editable = false
|
||||
SiteSetting.auth_overrides_email = true
|
||||
SiteSetting.auth_overrides_name = true
|
||||
|
Reference in New Issue
Block a user