main.py 文件源码

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

项目:pizza-auth 作者: xxpizzaxx 项目源码 文件源码
def group_apply(group):
    originalgroup = group
    group = str(group)
    assert(group in app.config["groups"]["closedgroups"]+app.config["groups"]["opengroups"])
    join = True
    if group in app.config["groups"]["closedgroups"]:
        group = group+"-pending"
        join = False
    if current_user.accountStatus[0]=="Ineligible":
        if group not in app.config["groups"]["publicgroups"]:
            flash("You cannot join that group.", "danger")
            return redirect("/groups")
    ldaptools.modgroup(current_user.get_id() , MOD_ADD, group)
    if join:
        flash("Joined %s group" % group, "success")
    else:
        flash("Applied for %s group" % originalgroup, "success")
    return redirect("/groups")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号