From 7ddf77b1ba53c3d915a7fcdbd37af6840f440cb3 Mon Sep 17 00:00:00 2001 From: cube Date: Fri, 20 Mar 2026 18:09:06 +0000 Subject: [PATCH] group privacy implemented --- myriad/manage.py | 3 ++- myriad/templates/groups.html | 3 +++ myriad/templates/manage/groups.html | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/myriad/manage.py b/myriad/manage.py index 5fb4d52..48d63c3 100644 --- a/myriad/manage.py +++ b/myriad/manage.py @@ -267,7 +267,8 @@ def group_edit(gid): if request.method == "POST": name = request.form["name"] desc = request.form["desc"] - db.execute("UPDATE groups SET group_name=(?), group_description=(?) WHERE id=(?)",(name, desc, gid)) + privacy = request.form["privacy"] + db.execute("UPDATE groups SET group_name=(?), group_description=(?), public=(?) WHERE id=(?)",(name, desc, privacy, gid)) db.commit() return redirect(url_for("manage.groups")) \ No newline at end of file diff --git a/myriad/templates/groups.html b/myriad/templates/groups.html index 93d0f2d..84eb323 100644 --- a/myriad/templates/groups.html +++ b/myriad/templates/groups.html @@ -4,6 +4,8 @@ {% block content %} {% for group in groups %} + {% if not g.user and group[3]==0 %} + {% else %}
{{group[1]}}
{{group[2]}}

@@ -13,6 +15,7 @@ {% endfor %} {% endif %}
+ {% endif %} {% endfor %} {% endblock %} \ No newline at end of file diff --git a/myriad/templates/manage/groups.html b/myriad/templates/manage/groups.html index dcbc08e..c8c16c0 100644 --- a/myriad/templates/manage/groups.html +++ b/myriad/templates/manage/groups.html @@ -22,8 +22,13 @@

+ +
+ +
+ Delete group - WARNING: this action is permanent and irreversible. this will not delete any members contained within the group.
{% endfor %}