supermarket icon indicating copy to clipboard operation
supermarket copied to clipboard

Improve error message when unable to create accounts

Open nellshamrell opened this issue 8 years ago • 3 comments

Issue Summary: Clicking create account when in LDAP leads to a broken page Request for Development: Product Fix Blocking Issue: Support identified how to fix the issue by hacking a live file.

We use LDAP authentication for our supermarket. When a user visits the site they are presented with 'Sign In' and 'Create Account'. Some users intuitively go to 'Create Account'., When in an LDAP environment the following error is then shown:

" The page you were looking for does not exist.

You may have mistyped the address or the page may have moved. "

A sensible message should be shown directing users to sign in as it's an LDAP environment or the 'Create account' option should not be shown when using LDAP

nellshamrell avatar May 10 '16 23:05 nellshamrell

Currently, Supermarket has no knowledge of how its affiliated Chef Server is authenticating users. I'd recommend researching option A "sensible message should be shown directing users to sign in as it's an LDAP environment" at the Chef Server side when Chef Server receives a request to /signup and LDAP is enabled. (Or just redirect /signup to the Chef Server's sign in—/auth/chef_oauth2?—endpoint.)

Option B—don't display Create Account link—may get trickier with Supermarket and Chef Server having to coordinate the knowledge that account creation is disabled because an external authn provider exists.

robbkidd avatar May 12 '16 17:05 robbkidd

Option B is also basically the requested feature #1231 .

robbkidd avatar May 17 '16 17:05 robbkidd

Can the signup URL not be overridden by setting $CHEF_SIGN_UP_URL in the Supermarket's environment? We may be able to resolve this issue with a simple documentation fix.

  def chef_sign_up_url
    ENV['CHEF_SIGN_UP_URL'] || "#{chef_manage_url}/signup?ref=community"
  end

https://github.com/chef/supermarket/blob/master/src/supermarket/app/helpers/custom_url_helper.rb#L52-L54

nathenharvey avatar Dec 16 '16 14:12 nathenharvey