Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Hiboo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cyrinux
Hiboo
Commits
ff414181
Verified
Commit
ff414181
authored
3 years ago
by
ornanovitch
Browse files
Options
Downloads
Patches
Plain Diff
more future proof design
parent
506a6c87
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hiboo/account/settings.py
+4
-2
4 additions, 2 deletions
hiboo/account/settings.py
hiboo/models.py
+2
-4
2 additions, 4 deletions
hiboo/models.py
hiboo/templates/macros.html
+1
-1
1 addition, 1 deletion
hiboo/templates/macros.html
with
7 additions
and
7 deletions
hiboo/account/settings.py
+
4
−
2
View file @
ff414181
...
...
@@ -58,7 +58,8 @@ def totp_setup():
auth
=
models
.
Auth
(
models
.
Auth
.
TOTP
)
auth
.
set_otp_key
()
user
.
auths
[
models
.
Auth
.
TOTP
]
=
auth
models
.
log
(
models
.
History
.
ENABLE_MFA
,
user
=
flask_login
.
current_user
)
models
.
log
(
models
.
History
.
MFA
,
comment
=
str
(
_
(
"
2FA has been enabled
"
)),
user
=
flask_login
.
current_user
)
models
.
db
.
session
.
add
(
auth
)
models
.
db
.
session
.
commit
()
flask
.
flash
(
_
(
"
Successfully setup 2FA
"
),
"
success
"
)
...
...
@@ -71,7 +72,8 @@ def totp_setup():
def
totp_delete
():
user
=
flask_login
.
current_user
auth
=
user
.
auths
[
models
.
Auth
.
TOTP
]
models
.
log
(
models
.
History
.
DISABLE_MFA
,
user
=
flask_login
.
current_user
)
models
.
log
(
models
.
History
.
MFA
,
comment
=
str
(
_
(
"
2FA has been disabled
"
)),
user
=
flask_login
.
current_user
)
models
.
db
.
session
.
delete
(
auth
)
models
.
db
.
session
.
commit
()
flask
.
flash
(
_
(
"
Successfully disabled 2FA
"
),
"
success
"
)
...
...
This diff is collapsed.
Click to expand it.
hiboo/models.py
+
2
−
4
View file @
ff414181
...
...
@@ -330,15 +330,13 @@ class History(db.Model):
STATUS
=
"
status
"
TRANSITION
=
"
transition
"
PASSWORD
=
"
password
"
ENABLE_MFA
=
"
enable 2fa
"
DISABLE_MFA
=
"
disable 2fa
"
MFA
=
"
mfa
"
DESCRIPTION
=
{
SIGNUP
:
_
(
"
signed up for this account
"
),
CREATE
:
_
(
"
created the profile {this.profile.username} on {this.service.name}
"
),
PASSWORD
:
_
(
"
changed this account password
"
),
ENABLE_MFA
:
_
(
"
enabled this account two-factor authentication (2FA) settings
"
),
DISABLE_MFA
:
_
(
"
disabled this account two-factor authentication (2FA) settings
"
),
MFA
:
_
(
"
modified this account multi-factor authentication (MFA) setting
"
),
STATUS
:
_
(
"
set the {this.service.name} profile {this.profile.username} as {this.value}
"
),
TRANSITION
:
_
(
"
did {this.transition.label} the profile {this.profile.username} on {this.service.name}
"
)
}
...
...
This diff is collapsed.
Click to expand it.
hiboo/templates/macros.html
+
1
−
1
View file @
ff414181
...
...
@@ -18,7 +18,7 @@
"
transition
"
:
"
recycle
",
"
password
"
:
"
lock
",
"
enable
2
fa
"
:
"
qrcode
",
"
disable
2
fa
"
:
"
qrcode
"
"
m
fa
"
:
"
qrcode
"
}[
event.category
]
}}
bg-blue
"
></i>
<div
class=
"timeline-item"
>
<span
class=
"time"
><i
class=
"fas fa-clock"
></i>
{{ event.created_at.time().strftime("%H:%M") }}
</span>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment