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)
评论列表
文章目录