File tree 2 files changed +14
-0
lines changed 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -397,6 +397,13 @@ def is_visible_to_user(self, user: Optional[UserType]) -> bool:
397
397
398
398
@transaction .atomic
399
399
def update_visibility (self ):
400
+ """
401
+ Updates the package listing's visibility based on whether its package is active, its review status,
402
+ and the visibility of its active versions.
403
+
404
+ By default, listings are visible to everyone (for now). Rejected listings aren't publicly visible,
405
+ and listings with inactive packages aren't visible at all.
406
+ """
400
407
self .visibility .public_detail = True
401
408
self .visibility .public_list = True
402
409
self .visibility .owner_detail = True
Original file line number Diff line number Diff line change @@ -431,6 +431,13 @@ def is_visible_to_user(self, user: UserType) -> bool:
431
431
432
432
@transaction .atomic
433
433
def update_visibility (self ):
434
+ """
435
+ Updates the version's visibility based on whether it or its package is active and its review status.
436
+ This may also change the visibility of related listings, so it calls update_visibility() on them.
437
+
438
+ By default, versions are visible to everyone (for now). Rejected versions aren't publicly visible,
439
+ and inactive versions or versions with inactive packages aren't visible at all.
440
+ """
434
441
self .visibility .public_detail = True
435
442
self .visibility .public_list = True
436
443
self .visibility .owner_detail = True
You can’t perform that action at this time.
0 commit comments