mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Only allow editors to access user comments page
This commit is contained in:
parent
1ef71b7a59
commit
da3af2c22f
@ -23,7 +23,7 @@ bp = Blueprint("threads", __name__)
|
||||
|
||||
from flask_login import current_user, login_required
|
||||
from app.models import *
|
||||
from app.utils import addNotification, isYes, addAuditLog, get_system_user
|
||||
from app.utils import addNotification, isYes, addAuditLog, get_system_user, rank_required
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import *
|
||||
from wtforms.validators import *
|
||||
@ -373,6 +373,7 @@ def new():
|
||||
|
||||
|
||||
@bp.route("/users/<username>/comments/")
|
||||
@rank_required(UserRank.EDITOR)
|
||||
def user_comments(username):
|
||||
user = User.query.filter_by(username=username).first()
|
||||
if user is None:
|
||||
|
Loading…
Reference in New Issue
Block a user