diff --git a/app/routes/__init__.py b/app/routes/__init__.py index acbdec2..32449c0 100644 --- a/app/routes/__init__.py +++ b/app/routes/__init__.py @@ -3,7 +3,7 @@ from app.routes import index, search, users, tools, development from app.routes.account import login, account, notification from app.routes.admin import index, groups, account, trophies, forums, \ - attachments, config + attachments, config, members from app.routes.forum import index, topic from app.routes.programs import index from app.routes.posts import edit diff --git a/app/routes/admin/members.py b/app/routes/admin/members.py new file mode 100644 index 0000000..407d661 --- /dev/null +++ b/app/routes/admin/members.py @@ -0,0 +1,14 @@ +from app.utils.priv_required import priv_required +from app.models.user import Member, Group, GroupPrivilege +from app.models.priv import SpecialPrivilege +from app.utils.render import render +from app import app, db + + +@app.route('/admin/membres', methods=['GET', 'POST']) +@priv_required('access-admin-panel') +def adm_members(): + users = Member.query.all() + users = sorted(users, key = lambda x: x.name) + + return render('admin/members.html', users=users) diff --git a/app/templates/admin/index.html b/app/templates/admin/index.html index 0b2b8c4..26694eb 100644 --- a/app/templates/admin/index.html +++ b/app/templates/admin/index.html @@ -9,6 +9,7 @@

Pages générales du panneau d'administration :