Skip to content

Commit c8b8403

Browse files
committed
move get_authorized_product_members / get_authorized_product_groups to Pro
After the V3 ViewSet removals (asset_members, asset_groups), no OS code calls these helpers any more — only Pro does. Drop them from dojo/product/queries.py and the now-orphan Product_Member, Product_Group, Global_Role imports. Pro's pro/product/queries.py owns the new home; Pro callers import from there.
1 parent 6156ce4 commit c8b8403

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

dojo/product/queries.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@
33
except ImportError:
44
def get_auth_filter(key): return None
55

6-
try:
7-
from dojo.authorization.models import (
8-
Global_Role,
9-
Product_Group,
10-
Product_Member,
11-
)
12-
except ImportError:
13-
Global_Role = None
14-
Product_Group = None
15-
Product_Member = None
16-
176
from dojo.models import (
187
App_Analysis,
198
DojoMeta,
@@ -34,20 +23,6 @@ def get_authorized_products(permission, user=None):
3423
return Product.objects.all().order_by("name")
3524

3625

37-
def get_authorized_product_members(permission):
38-
impl = get_auth_filter("product.get_authorized_product_members")
39-
if impl:
40-
return impl(permission)
41-
return Product_Member.objects.all().order_by("id").select_related("role")
42-
43-
44-
def get_authorized_product_groups(permission):
45-
impl = get_auth_filter("product.get_authorized_product_groups")
46-
if impl:
47-
return impl(permission)
48-
return Product_Group.objects.all().order_by("id").select_related("role")
49-
50-
5126
# Cached: all parameters are hashable, no dynamic queryset filtering
5227
@cache_for_request
5328
def get_authorized_app_analysis(permission):

0 commit comments

Comments
 (0)