from app.utils.priv_required import priv_required
from flask_wtf import FlaskForm
from wtforms import SubmitField
from app.models.users import Member, Group, GroupPrivilege
from app.models.privs import SpecialPrivilege
from app.utils.render import render
from app import app, db
import yaml
import os


@app.route('/admin/groups', methods=['GET', 'POST'])
@priv_required('access-admin-panel')
def adm_groups():
    users = Member.query.all()
    groups = Group.query.all()

    return render('admin/groups_privileges.html', users=users, groups=groups)
