Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

feature: local login form can be disabled #1603

Merged
merged 1 commit into from
Jan 22, 2018
Merged

Conversation

figroc
Copy link
Contributor

@figroc figroc commented Jan 19, 2018

disable login form to enable OAuth only login page

@vitoravelino
Copy link
Contributor

Hi!

Some tests are failing. You forgot to enable the config for those since it's related to the user login. You also need to add this config option to the portusctl cli.rb to fix the options_spec test.

I think this idea is fine. Once you fix those issues, we can merge it. Thanks!

@figroc
Copy link
Contributor Author

figroc commented Jan 19, 2018

Sorry for the noisy commits. I wasn't able to build the project at my local machine.

@vitoravelino
Copy link
Contributor

No problem with the amount of commits. Before the merge we always ask people to squash their commits. :)

@@ -109,6 +109,36 @@ module CleanRoom
expect(page).to have_current_path(new_user_session_path)
end

it "Login form is enabled when local_login is enabled" do
APP_CONFIG["local_login"] = { "enabled" => true }
Copy link
Contributor

Choose a reason for hiding this comment

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

The default is enabled, so you don't need to do this here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer to keep this very line. The config should be explicitly specified for this test case, for whatever default value is.

Copy link
Collaborator

@mssola mssola left a comment

Choose a reason for hiding this comment

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

Sounds like a good idea, but as I said, I would move this inside of the oauth section, since this option only makes sense in this situation.

#
# This is ignored if LDAP is enabled. Read more about this here:
# http://port.us.org/features/disabling_local_login.html
local_login:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it would make sense to place this inside of the oauth section ?

.rubocop.yml Outdated
@@ -43,7 +43,7 @@ Metrics/BlockLength:
# 2. The models regarding the registry have to be modularized.
# 3. LDAP has to be refactored.
Metrics/ClassLength:
Max: 210
Max: 214
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why ? 😕

Copy link
Contributor Author

@figroc figroc Jan 22, 2018

Choose a reason for hiding this comment

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

I add four lines to cli.rb.
rubocop complained.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I see. Then simply disable this cop for the whole cli.rb instead of raising this value. This is because this portusctl is deprecated in favor of openSUSE/portusctl in 2.3, and since we have already created the 2.3 branch, we will nuke this code in master rather soon 😉

mssola
mssola previously approved these changes Jan 22, 2018
Copy link
Collaborator

@mssola mssola left a comment

Choose a reason for hiding this comment

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

Cool, thanks 👏 Now let's wait for Travis and we can merge this.

@mssola
Copy link
Collaborator

mssola commented Jan 22, 2018

@figroc could you squash your commits ?

Signed-off-by: Peng Chen <figroc@gmail.com>
@figroc
Copy link
Contributor Author

figroc commented Jan 22, 2018

Done. Thank you for the reviews @vitoravelino @mssola .
Looking forward for the merge and release ;)

@mssola mssola merged commit 0632954 into SUSE:master Jan 22, 2018
@mssola
Copy link
Collaborator

mssola commented Jan 22, 2018

Thanks @figroc for this! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants