Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable or modify built-in registration links when singleService is not empty #62

Closed
mhenry07 opened this issue Feb 1, 2018 · 2 comments
Assignees

Comments

@mhenry07
Copy link

mhenry07 commented Feb 1, 2018

If singleService is not empty and the register action is enabled, then the built-in registration links and form are confusing to the user. This is because they can register as a built-in user but can't log in using built-in authentication since it's disabled and they must log in using the oauth service. The register action may be enabled to allow the oauth service to register oauth users in DokuWiki. In this scenario, the "Register" links in tools menus should either:

  • be hidden from the user and the registration form disabled for the user (however I imagine the oauth service may still need to submit to the backend registration form handler)
  • or, the "Register" links might instead direct the user to the oauth service's registration page

Condition for this scenario:

$conf['authtype'] === 'oauth' && actionOK('register') && !empty($conf['plugin']['oauth']['singleService'])

For now, I created a temporary workaround by creating a template which strips "Register" links from the default template (plus some other tweaks): https://github.com/mhenry07/dokuwiki-template-dokupruned. But ideally I think this would be better handled at a lower level than a custom template.

Perhaps new configuration options could be created such as:

$conf['plugin']['oauth']['registerType'] = 'url'; # builtin | hidden | url
$conf['plugin']['oauth']['registerUrl'] = 'https://oauth-service.example/register';

These would affect the generated register action links/options and/or redirect register action to registerUrl (while still allowing oauth service to register oauth users).

An alternative might be to have an additional option for disableactions: 'registerfrontend', which would disable the registration frontend (links and user form) while keeping the register backend enabled so oauth services can register oauth users.

@mhenry07
Copy link
Author

mhenry07 commented Feb 1, 2018

Looks like there's a discussion about this in #22 and someone even submitted a pull request #43 which would resolve this issue (except for the option for an external registration URL which isn't as important).

@annda
Copy link
Contributor

annda commented Jan 4, 2022

In the current version of the plugin you can simply disable registration and still new users will be created if they have an account with your authentication provider.

@annda annda closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants