mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Make user list public
This commit is contained in:
parent
950512c2a7
commit
2fbc44bd54
@ -133,7 +133,8 @@
|
||||
<a href="https://github.com/minetest/contentdb">GitHub</a> |
|
||||
<a href="{{ url_for('flatpage', path='help') }}">Help</a> |
|
||||
<a href="{{ url_for('flatpage', path='policy_and_guidance') }}">Policy and Guidance</a> |
|
||||
<a href="{{ url_for('flatpage', path='help/reporting') }}">Report / DMCA</a>
|
||||
<a href="{{ url_for('flatpage', path='help/reporting') }}">Report / DMCA</a> |
|
||||
<a href="{{ url_for('user_list_page') }}">User List</a>
|
||||
</footer>
|
||||
|
||||
<script src="/static/jquery.min.js"></script>
|
||||
|
@ -11,8 +11,10 @@
|
||||
<a href="{{ url_for('user_profile_page', username=user.username) }}">
|
||||
{{ user.display_name }}
|
||||
</a> -
|
||||
{{ user.rank.getTitle() }} -
|
||||
{{ user.packages.count() }} packages.
|
||||
{{ user.rank.getTitle() }}
|
||||
{% if current_user.is_authenticated %}
|
||||
- {{ user.packages.count() }} packages.
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
@ -35,8 +35,8 @@ class UserProfileForm(FlaskForm):
|
||||
rank = SelectField("Rank", [Optional()], choices=UserRank.choices(), coerce=UserRank.coerce, default=UserRank.NEW_MEMBER)
|
||||
submit = SubmitField("Save")
|
||||
|
||||
|
||||
@app.route("/users/", methods=["GET"])
|
||||
@login_required
|
||||
def user_list_page():
|
||||
users = User.query.order_by(db.desc(User.rank), db.asc(User.display_name)).all()
|
||||
return render_template("users/list.html", users=users)
|
||||
|
Loading…
Reference in New Issue
Block a user