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
Container Registry
Model registry
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
ACIDES
Hiboo
Commits
861db98c
Commit
861db98c
authored
4 years ago
by
kaiyou
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Merge branch 'issue#43' into 'master'"
This reverts merge request !15
parent
2ca2fe7e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!20
Add 'remember me' button
Pipeline
#1360
canceled
4 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hiboo/models.py
+1
-3
1 addition, 3 deletions
hiboo/models.py
hiboo/profile/admin.py
+1
-1
1 addition, 1 deletion
hiboo/profile/admin.py
hiboo/profile/templates/profile_list.html
+0
-1
0 additions, 1 deletion
hiboo/profile/templates/profile_list.html
with
2 additions
and
5 deletions
hiboo/models.py
+
1
−
3
View file @
861db98c
...
@@ -176,15 +176,13 @@ class Profile(db.Model):
...
@@ -176,15 +176,13 @@ class Profile(db.Model):
ACTIVE
=
"
active
"
ACTIVE
=
"
active
"
BLOCKED
=
"
blocked
"
BLOCKED
=
"
blocked
"
DELETED
=
"
deleted
"
DELETED
=
"
deleted
"
REJECTED
=
"
rejected
"
STATUSES
=
{
STATUSES
=
{
UNCLAIMED
:
(
"
gray
"
,
_
(
"
unclaimed
"
)),
UNCLAIMED
:
(
"
gray
"
,
_
(
"
unclaimed
"
)),
REQUEST
:
(
"
blue
"
,
_
(
"
requested
"
)),
REQUEST
:
(
"
blue
"
,
_
(
"
requested
"
)),
ACTIVE
:
(
"
green
"
,
_
(
"
active
"
)),
ACTIVE
:
(
"
green
"
,
_
(
"
active
"
)),
BLOCKED
:
(
"
orange
"
,
_
(
"
blocked
"
)),
BLOCKED
:
(
"
orange
"
,
_
(
"
blocked
"
)),
DELETED
:
(
"
red
"
,
_
(
"
deleted
"
)),
DELETED
:
(
"
red
"
,
_
(
"
deleted
"
))
REJECTED
:
(
"
orange
"
,
_
(
"
rejected
"
))
}
}
user_uuid
=
db
.
Column
(
db
.
String
(
36
),
db
.
ForeignKey
(
User
.
uuid
))
user_uuid
=
db
.
Column
(
db
.
String
(
36
),
db
.
ForeignKey
(
User
.
uuid
))
...
...
This diff is collapsed.
Click to expand it.
hiboo/profile/admin.py
+
1
−
1
View file @
861db98c
...
@@ -34,7 +34,7 @@ def details(profile_uuid):
...
@@ -34,7 +34,7 @@ def details(profile_uuid):
@security.confirmation_required
(
"
change the profile status
"
)
@security.confirmation_required
(
"
change the profile status
"
)
@security.admin_required
()
@security.admin_required
()
def
set_status
(
profile_uuid
,
status
):
def
set_status
(
profile_uuid
,
status
):
if
status
not
in
(
models
.
Profile
.
ACTIVE
,
models
.
Profile
.
BLOCKED
,
models
.
Profile
.
REJECTED
):
if
status
not
in
(
models
.
Profile
.
ACTIVE
,
models
.
Profile
.
BLOCKED
):
flask
.
abort
(
403
)
flask
.
abort
(
403
)
profile
=
models
.
Profile
.
query
.
get
(
profile_uuid
)
or
flask
.
abort
(
404
)
profile
=
models
.
Profile
.
query
.
get
(
profile_uuid
)
or
flask
.
abort
(
404
)
profile
.
status
=
status
profile
.
status
=
status
...
...
This diff is collapsed.
Click to expand it.
hiboo/profile/templates/profile_list.html
+
0
−
1
View file @
861db98c
...
@@ -49,7 +49,6 @@
...
@@ -49,7 +49,6 @@
<a
href=
"{{ url_for("
profile.set_status
",
profile_uuid=
profile.uuid,
status=
"active"
)
}}"
>
{% trans %}Unblock profile{% endtrans %}
</a>
<a
href=
"{{ url_for("
profile.set_status
",
profile_uuid=
profile.uuid,
status=
"active"
)
}}"
>
{% trans %}Unblock profile{% endtrans %}
</a>
{% elif profile.status == "request" %}
{% elif profile.status == "request" %}
<a
href=
"{{ url_for("
profile.set_status
",
profile_uuid=
profile.uuid,
status=
"active"
)
}}"
>
{% trans %}Validate profile{% endtrans %}
</a>
<a
href=
"{{ url_for("
profile.set_status
",
profile_uuid=
profile.uuid,
status=
"active"
)
}}"
>
{% trans %}Validate profile{% endtrans %}
</a>
<a
href=
"{{ url_for("
profile.set_status
",
profile_uuid=
profile.uuid,
status=
"rejected"
)
}}"
>
{% trans %}Rejected profile{% endtrans %}
</a>
{% elif profile.status == "unclaimed" %}
{% elif profile.status == "unclaimed" %}
<a
href=
"{{ url_for("
profile.assign
",
profile_uuid=
profile.uuid)
}}"
>
{% trans %}Assign profile{% endtrans %}
</a>
<a
href=
"{{ url_for("
profile.assign
",
profile_uuid=
profile.uuid)
}}"
>
{% trans %}Assign profile{% endtrans %}
</a>
{% endif %}
{% endif %}
...
...
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