main.py 文件源码

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

项目:pizza-auth 作者: xxpizzaxx 项目源码 文件源码
def groupmkping(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")
    id = str(id)
    group = str(group)
    try:
        ldaptools.modgroup(id, MOD_ADD, "ping-%s" % group)
        flash("Membership of ping-%s added for %s" % (group, id), "success")
    except:
        flash("That user is already in that group.", "danger")
    return redirect("/groups/list/"+group)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号