diff --git a/hiboo/models.py b/hiboo/models.py index 1c25397eb91aaadf8a4514de04111391782ceac2..85127d356e0df943080b7e5e449769e2df58b8fe 100644 --- a/hiboo/models.py +++ b/hiboo/models.py @@ -176,15 +176,13 @@ class Profile(db.Model): ACTIVE = "active" BLOCKED = "blocked" DELETED = "deleted" - REJECTED = "rejected" STATUSES = { UNCLAIMED: ("gray", _("unclaimed")), REQUEST: ("blue", _("requested")), ACTIVE: ("green", _("active")), BLOCKED: ("orange", _("blocked")), - DELETED: ("red", _("deleted")), - REJECTED: ("orange", _("rejected")) + DELETED: ("red", _("deleted")) } user_uuid = db.Column(db.String(36), db.ForeignKey(User.uuid)) diff --git a/hiboo/profile/admin.py b/hiboo/profile/admin.py index a5c476201e5b97d28a5ab23f4b94452ebaa5ff9d..1a99cb0dd1a8e750cdec4df3238b3674b89206ad 100644 --- a/hiboo/profile/admin.py +++ b/hiboo/profile/admin.py @@ -34,7 +34,7 @@ def details(profile_uuid): @security.confirmation_required("change the profile status") @security.admin_required() 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) profile = models.Profile.query.get(profile_uuid) or flask.abort(404) profile.status = status diff --git a/hiboo/profile/templates/profile_list.html b/hiboo/profile/templates/profile_list.html index d8d8fa75ba4300aca38ca9219df07902d9de5acb..08b1e6f95eb9f315be662bc011bbeaa9b82cf688 100644 --- a/hiboo/profile/templates/profile_list.html +++ b/hiboo/profile/templates/profile_list.html @@ -49,7 +49,6 @@ <a href="{{ url_for("profile.set_status", profile_uuid=profile.uuid, status="active") }}">{% trans %}Unblock profile{% endtrans %}</a> {% 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="rejected") }}">{% trans %}Rejected profile{% endtrans %}</a> {% elif profile.status == "unclaimed" %} <a href="{{ url_for("profile.assign", profile_uuid=profile.uuid) }}">{% trans %}Assign profile{% endtrans %}</a> {% endif %}