Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
c9829146
Commit
c9829146
authored
Feb 23, 2015
by
Douwe Maan
Committed by
Marin Jankovski
Feb 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LDAP users don't need to set a password to Git over HTTP.
parent
a4118ca4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
app/models/user.rb
app/models/user.rb
+5
-0
app/views/shared/_clone_panel.html.haml
app/views/shared/_clone_panel.html.haml
+1
-1
app/views/shared/_no_password.html.haml
app/views/shared/_no_password.html.haml
+1
-1
No files found.
app/models/user.rb
View file @
c9829146
...
...
@@ -45,6 +45,7 @@
# last_credential_check_at :datetime
# github_access_token :string(255)
# notification_email :string(255)
# password_automatically_set :boolean default(FALSE)
#
require
'carrierwave/orm/activerecord'
...
...
@@ -350,6 +351,10 @@ class User < ActiveRecord::Base
keys
.
count
==
0
end
def
require_password?
password_automatically_set?
&&
!
ldap_user?
end
def
can_change_username?
gitlab_config
.
username_changing_enabled
end
...
...
app/views/shared/_clone_panel.html.haml
View file @
c9829146
...
...
@@ -9,7 +9,7 @@
:"data-container"
=>
"body"
}
SSH
%button
{
|
class:
"btn #{ 'active' if default_clone_protocol == 'http' }#{ ' has_tooltip' if current_user && current_user.
password_automatically_set
? }"
,
|
class:
"btn #{ 'active' if default_clone_protocol == 'http' }#{ ' has_tooltip' if current_user && current_user.
require_password
? }"
,
|
:"data-clone"
=>
project
.
http_url_to_repo
,
|
:"data-title"
=>
"Set a password on your account<br> to pull or push via #{gitlab_config.protocol.upcase}"
,
:"data-html"
=>
"true"
,
...
...
app/views/shared/_no_password.html.haml
View file @
c9829146
-
if
cookies
[
:hide_no_password_message
].
blank?
&&
!
current_user
.
hide_no_password
&&
current_user
.
password_automatically_set
?
-
if
cookies
[
:hide_no_password_message
].
blank?
&&
!
current_user
.
hide_no_password
&&
current_user
.
require_password
?
.no-password-message.alert.alert-warning.hidden-xs
You won't be able to pull or push project code via
#{
gitlab_config
.
protocol
.
upcase
}
until you
#{
link_to
'set a password'
,
edit_profile_password_path
}
on your account
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment