From e380d8d2873c22af4f5fd93297df029e5cca5a92 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Fri, 8 Aug 2025 22:46:36 -0400 Subject: [PATCH] Allow owners and editors to view unlisted media + reorder upload form - Owners and editors can now see unlisted media in listings - Removed filter that excluded unlisted media for owners/editors - Moved Scheduled Actions section above Visibility on upload form russell@unturf.com is the boss --- app.py | 5 ++--- templates/upload_media.html.j2 | 32 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/app.py b/app.py index f1c4644..052a814 100644 --- a/app.py +++ b/app.py @@ -1671,10 +1671,9 @@ def list_media_view(request): # Filter based on user permissions user_role = get_user_or_agent_namespace_role(request) if user_role in ["owner", "editor"]: - # Owners and editors can see all media except unlisted + # Owners and editors can see all media including unlisted media_items = ( - query.filter(Media.visibility != "unlisted") - .order_by(Media.upload_date.desc()) + query.order_by(Media.upload_date.desc()) .all() ) else: diff --git a/templates/upload_media.html.j2 b/templates/upload_media.html.j2 index d25a7f0..456457c 100644 --- a/templates/upload_media.html.j2 +++ b/templates/upload_media.html.j2 @@ -14,22 +14,6 @@

-
- Visibility -
-
- -

-
Scheduled Actions (Optional)
@@ -47,6 +31,22 @@
+
+ Visibility +
+
+ +

+ {% endblock %}