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
Boxiang Sun
gitlab-ce
Commits
057d45fb
Commit
057d45fb
authored
Jul 13, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use password field default password masking.
parent
31565d78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+0
-10
app/views/shared/_field.html.haml
app/views/shared/_field.html.haml
+2
-2
No files found.
app/helpers/projects_helper.rb
View file @
057d45fb
...
...
@@ -248,16 +248,6 @@ module ProjectsHelper
end
end
def
service_field_value
(
type
,
value
)
return
value
unless
type
==
'password'
if
value
.
present?
"***********"
else
nil
end
end
def
user_max_access_in_project
(
user
,
project
)
level
=
project
.
team
.
max_member_access
(
user
)
...
...
app/views/shared/_field.html.haml
View file @
057d45fb
-
name
=
field
[
:name
]
-
title
=
field
[
:title
]
||
name
.
humanize
-
value
=
service_field_value
(
field
[
:type
],
@service
.
send
(
name
)
)
-
value
=
@service
.
send
(
name
)
-
type
=
field
[
:type
]
-
placeholder
=
field
[
:placeholder
]
-
choices
=
field
[
:choices
]
...
...
@@ -19,6 +19,6 @@
-
elsif
type
==
'select'
=
form
.
select
name
,
options_for_select
(
choices
,
value
?
value
:
default_choice
),
{},
{
class:
"form-control"
}
-
elsif
type
==
'password'
=
form
.
password_field
name
,
placeholder
:
value
,
class:
'form-control'
=
form
.
password_field
name
,
value
:
value
,
class:
'form-control'
-
if
help
%span
.help-block
=
help
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