To accomplish this task, you should create a new authentication type, inherited from the AuthenticationBase, and combine the code of the AuthenticationStandard and AuthenticationActiveDirectory classes in it. Additionally, you should create a custom logon parameters class with a property, allowing users to select the authentication type.
Question Comments
Added By: Raoulw at: 5/28/2012 11:14:21 AM
Sample broken.
System.Reflection.MethodInfo mi = typeof(SecurityStrategyBase).GetMethod("InitializeNewUser", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
Should be:
System.Reflection.MethodInfo mi = typeof(SecurityStrategyBase).GetMethod("InitializeNewUserCore", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
In 11.2.11
Raoul.
Added By: Apostolis Bekiaris (DevExpress) at: 7/8/2013 10:02:55 PMAdded to www.eXpandFramework.com 13.1.5.1 enjoy!
Added By: Yahya Mum at: 4/1/2014 11:38:19 PMHello,
Thank you very much for this great functionality.
However I want the "UserName" and "Password" fields to be DISABLED , when the "ActiveDirectory" checkbox is checked. If it is unchecked then these values should be enabled again. It will be a better approach for the end users. How can I accomplish this. I tried using the "Appearance" module. But it didn't work.
For Example:
I put below Attribute above the UserName property
[Appearance("DisablePassword", Enabled = false, Criteria = "UseActiveDirectory",Context="DetailView")]
But didn't work.
Thanks.
Added By: Svatopluk Ulicny at: 4/9/2014 3:01:49 AMHi, I has same question as Yahya Mum, is it possible?
Thanks
I was having the same issue as Yahya and Martin. I solved it by merging codes from E2371, E3931 and https://documentation.devexpress.com/#Xaf/CustomDocument3475
Works like a charm now.
Added By: Michael (DevExpress Support) at: 9/15/2014 7:38:29 AM To make dynamic appearance rules work correctly on the logon form, in addition to the code provided in the Use Conditional Appearance on the Logon Form article, you need to create a controller (and add it to the CreateLogonWindowControllers method of course) that will refresh the appearance when a property is changed.[C#]publicclassMyLogonController:ViewController<DetailView>{publicMyLogonController(){TargetObjectType=typeof(AuthenticationCombinedLogonParameters);}protectedoverridevoidOnActivated(){base.OnActivated();PropertyEditoreditor=View.FindItem("UseActiveDirectory")asPropertyEditor;if(editor!=null){editor.ValueStored+=newEventHandler(editor_ValueStored);}}voideditor_ValueStored(objectsender,EventArgse){Frame.GetController<AppearanceController>().Refresh();}}
We will address this issue in the future when improve the support for non-persistent objects.