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

Improve login screen when only OmniAuth providers are enabled #7473

Merged
merged 1 commit into from Mar 2, 2015

Conversation

sodabrew
Copy link
Contributor

Hide the text "No authentication methods configured." when Signin and LDAP are disabled but OmniAuth is enabled.
Hide the link to "Did not receive confirmation email?" when Signup is disabled.

@TeatroIO
Copy link

I've prepared a stage. Click to open.

@Wachiwi
Copy link

Wachiwi commented Aug 11, 2014

👍

@sodabrew
Copy link
Contributor Author

I also noticed there's an extra HR. Will update the commit in a minute. Sadly I think there's some unavoidable spaghetti logic here :|

@sodabrew
Copy link
Contributor Author

Before
screen shot 2014-08-23 at 11 11 19 pm

After
screen shot 2014-08-23 at 11 37 59 pm

@Razer6
Copy link
Member

Razer6 commented Sep 13, 2014

@randx Can you take a look?

@dblessing
Copy link
Member

@sodabrew I agree about the logic :) I'm not sure I like all the no_auth foo. @randx opinions?

@dzaporozhets
Copy link
Member

no_auth is not ok. You can make helper method like auth_available? instead of increasing magic number

@dblessing
Copy link
Member

@sodabrew Please see the comments about no_auth.

@sodabrew
Copy link
Contributor Author

Thanks for the reviews! I'll try to take a look at updating the PR this week.

@sodabrew sodabrew force-pushed the patch-1 branch 2 times, most recently from 94b0a89 to 94cf618 Compare November 13, 2014 17:15
@sodabrew
Copy link
Contributor Author

Ping, developer action was taken.

@dblessing
Copy link
Member

Thanks @sodabrew. I'll take a look shortly.

%div
No authentication methods configured.

= render 'devise/sessions/oauth_providers' if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable?
- if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be an elsif?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because you can have Login, LDAP, both, or neither, and then you can also have Omniauth providers.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explaining.

@dblessing
Copy link
Member

@sodabrew UI is exactly the same as the original screenshots? See my one comment on elsif, too.

@@ -20,11 +20,15 @@

- elsif gitlab_config.signin_enabled
= render 'devise/sessions/new_base'
- else

- elsif !Gitlab.config.omniauth.enabled || !devise_mapping.omniauthable?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose that we move this block to the end and use else instead of elsif. If everything above it fails then we will want to display this without any further conditions.

@dblessing
Copy link
Member

This looks much better than the no_auth route.

@dblessing
Copy link
Member

@randx This looks good.

@dblessing dblessing closed this Dec 26, 2014
@dblessing dblessing reopened this Dec 26, 2014
@sodabrew
Copy link
Contributor Author

sodabrew commented Jan 7, 2015

@dblessing @randx Anything I can do to help move this PR forward? Should I put up new screenshots, since the login page has changed a bit since August?

@dzaporozhets dzaporozhets modified the milestone: 7.8 Jan 13, 2015
@dzaporozhets
Copy link
Member

I will take a look at 7.8. Sorry we are busy with release now

@dblessing
Copy link
Member

@sodabrew In this next few days please rebase so this is mergeable when Dmitriy gets a chance to come back to this for 7.8.

@sodabrew
Copy link
Contributor Author

Will do, thx.

@jvanbaarsen
Copy link
Contributor

We can only accept a merge request if all the tests are green. I've just restarted the build. When the tests are still not passing after this restart and you're sure that is does not have anything to do with your code changes, please rebase with master to see if that solves the issue.

@sodabrew
Copy link
Contributor Author

sodabrew commented Feb 8, 2015

The failure is unrelated. Tell me when your master branch isn't broken and I'll rebase.

Avoids an empty Sign in box when signup_enabled? is false, and avoids
showing "No authentication methods configured" unless there really are none.

OmniAuth signin gets its own file for consistency with signin and signup and LDAP.
@sodabrew
Copy link
Contributor Author

The signin files changed a lot, rebased to match up with new layout. Here's the problem with current master. The solution is to not draw the first box if there are omniauth providers defined.
screen shot 2015-02-13 at 11 28 00 pm

@dzaporozhets
Copy link
Member

Looks good. Thank you

dzaporozhets added a commit that referenced this pull request Mar 2, 2015
Improve login screen when only OmniAuth providers are enabled
@dzaporozhets dzaporozhets merged commit 12581f1 into gitlabhq:master Mar 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
7 participants