main.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:pizza-auth 作者: xxpizzaxx 项目源码 文件源码
def groupapprove(id, group):
    if ("admin" not in current_user.get_authgroups()) and ("admin-%s" % group not in current_user.get_authgroups()):
        flash("You do not have the right to do that.", "danger")
        return redirect("/groups/admin")
    try:
        id = str(id)
        group = str(group)
        ldaptools.modgroup(id, MOD_DELETE, group+"-pending")
        ldaptools.modgroup(id, MOD_ADD, group)
        flash("Membership of %s approved for %s" % (group, id), "success")
        return redirect("/groups/admin")
    except:
        flash("Membership application not found", "danger")
        return redirect("/groups/admin")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号