-
Notifications
You must be signed in to change notification settings - Fork 473
feature: local login form can be disabled #1603
Conversation
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 I think this idea is fine. Once you fix those issues, we can merge it. Thanks! |
Sorry for the noisy commits. I wasn't able to build the project at my local machine. |
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 } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
config/config.yml
Outdated
# | ||
# This is ignored if LDAP is enabled. Read more about this here: | ||
# http://port.us.org/features/disabling_local_login.html | ||
local_login: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ? 😕
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😉
There was a problem hiding this 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.
@figroc could you squash your commits ? |
Signed-off-by: Peng Chen <figroc@gmail.com>
Done. Thank you for the reviews @vitoravelino @mssola . |
Thanks @figroc for this! 👍 |
disable login form to enable OAuth only login page