How to disable submit using custom policy in Azure B2C until the checkbox is checked - azure-b2c

I've term and condition checkbox. Until user tick's the checkbox, submit button should be disabled. Once he tick's checkbox the submit button should be enabled.
I'm aware that it can be achieved using JavaScript, But I need to achieved this using custom policy.
Please let me know if their is anyway for the same.
Thanks in advance.
I didn't find anyway to disable the element using custom policy. Unlike user flows.

Related

Dynamics CRM + Hide a button based on security role

I want to hide a button on the ribbon for all users except System Admin and I do not want to write javascript to check the security role of the logged in users. Is there any out-of-box way I can achieve this?
Also is there any entity that only admin has access to which I can use to hide show the button?
Yes, you can achieve this without code.
One option is using MiscellaneousPrivilgeRule under display rules and making sure to pick some privilege like Publish Duplicate Detection Rules which may not be given to non-Admin roles.
Read more
There’s no OOB entity for that purpose, you can identify one in your system or create a dummy entity for that purpose.
Yes you can try this option.
Create a Custom Entity (Custom Button Privelege)
By default only Sys Admin/Cust role will have Privelege to do CRUD operation.
In the custom button -> Display Rule. Set a Entity Privelege Rule based on the custom entity.
Now the button will be visible only for the Admin users & will be hidden for other users.
Similarly we can modify the security role for others as well.

How to call Submit from Credential Provider

As far as I could understand, when the user presses the Submit button eventually, the GetSerialization method will be called to get login details.
I am programming a Credential Provider that waits for some external signal to log in, and I do not want the user to press the Submit button.
Is it possible to trigger the submit event from the Credential Provider?
I found a way to do it. The trick is not to call the submit button, but use the ICredentialProviderEvents::CredentialsChanged method. I have a thread running, that will eventually trigger the CredentialsChanged. This will then enable a new Credential that logs the user in.
This is shown in the Microsoft Sample SampleHardwareEventCredentialProvider.
It is worth notice that the Windows LogonUI automatically selects this new Credential. I do not know if this is in the documentation, but it is the behaviour I experienced.
The more appropriate way would be to implement the IConnectableCredentialProviderCredential interface, which is designed specifically for this purpose.

How can I trigger a javascript Facebook authentication dialog box on an anchor tag?

I have a simple rating system that logged in users can just click and it updates asynchronously.
However, I still want non-logged in users to see the rating mechanism (let's say a simple "up" arrow) but trigger the Facebook authentication popup when they click the link.
Can you help? I have the regular fb:login button working just fine. But how can I trigger this action on a regular anchor tag (in addition to the fb:login button).
You need to call the FB.login method
https://developers.facebook.com/docs/reference/javascript/FB.login/
You can bind this to the button click for non logged in users, on the callback you can register the original rating action or refresh the page.

Disable User Auto Timeout - Joomla 1.5

I wanted to disable user auto timeout session for joomla (I am using joomla 1.5), so the user login to my site will stay forever without being kicked out by auto timeout. How to achieve that? Please help.
Thank you.
It's a setting in the login module. If you enable the "Remember Me" option, users will not be logged out unless they click the logout button. You can also modify the form so that the Remember Me option is a hidden field rather than a checkbox to default all users to stay logged in all the time.

Joomla user registration plugin

I am interested in customizing the authentication method for a Joomla website.
There is a comprehensive tutorial on how to make a custom authentication plug-in, however a plug-in of that sort customizes the behavior on each log-in.
The behavior I need to implement should occur only once during registration. Is there any way to implement this?
You'll want to create a user plugin that responds to the onBeforeStoreUser event instead of an authentication plugin. The plugin creation process is much the same for user plugins. The onBeforeStoreUser event receives two arguments: the user object and a boolean flag indicating whether or not the user is a new one.
You can look at plugins/user/example.php to see all of the user plugin event handlers.

Resources