Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
birger
users
Commits
bf4a3bf9
Commit
bf4a3bf9
authored
Aug 20, 2018
by
o@immerda.ch
Browse files
update app pw api
parent
10feffe2
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/controllers/app_passwords_controller.rb
View file @
bf4a3bf9
...
...
@@ -2,7 +2,8 @@ class AppPasswordsController < ApplicationController
def
show
begin
res
=
ApiBackend
::
app_passwords
(
current_user
)
@passwords
=
res
[
'names'
]
puts
res
@passwords
=
res
[
'res'
]
if
session
[
:app_pw
]
@app_pw
=
session
[
:app_pw
]
begin
...
...
app/views/app_passwords/show.html.erb
View file @
bf4a3bf9
...
...
@@ -16,12 +16,18 @@
<%
if
@passwords
&&
!
@passwords
.
empty?
%>
<ul>
<%
@passwords
.
each
do
|
pw
|
%>
<%
@passwords
.
each
do
|
pw
,
lastlogin
|
%>
<li>
<%=
form_tag
(
app_passwords_path
,
method:
"post"
)
do
%>
<%=
pw
%>
<%=
hidden_field_tag
(
:delete
,
''
,
value:
pw
)
%>
<%=
submit_tag
(
t
:delete
)
%>
<%=
pw
%>
(
<%-
if
lastlogin
%>
<%=
t
(
:last_used
)
%>
:
<%=
lastlogin
%>
<%-
else
%>
<%=
t
(
:never_used
)
%>
<%-
end
%>
)
<%=
hidden_field_tag
(
:delete
,
''
,
value:
pw
)
%>
<%=
submit_tag
(
t
:delete
)
%>
<%
end
%>
</li>
<%
end
%>
...
...
config/locales/de.yml
View file @
bf4a3bf9
...
...
@@ -84,6 +84,8 @@ de:
password_help
:
"
Wie
finde
ich
ein
gutes
Passwort?"
weak_password_hint
:
"
Du
verwendest
ein
einfach
zu
erratendes
Passwort.
Bite
ändere
es."
qr_token_help
:
"
Du
kannst
diesen
QrCode
scannen
und
den
Code
in
einem
Passwortmanager
abspeichern
(wie
zum
Beispiel
Keepass2Android
auf
Android)."
last_used
:
"
zuletzt
verwendet"
never_used
:
"
nie
verwendet"
activerecord
:
errors
:
...
...
config/locales/en.yml
View file @
bf4a3bf9
...
...
@@ -82,6 +82,8 @@ en:
password_help
:
"
How
do
I
come
up
wit
a
good
password?"
weak_password_hint
:
"
You
are
using
an
easily
guessable
password.
Please
change
it."
qr_token_help
:
"
You
can
scan
this
QrCode
and
store
the
Token
in
a
password
store
(like
Keepass2Android
on
Android)."
last_used
:
"
last
used"
never_used
:
"
never
used"
activerecord
:
...
...
Write
Preview
Supports
Markdown
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