Skip to content

Commit

Permalink
docs: clarify difference from can_view_taxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 16, 2023
1 parent eb599ce commit bc8efc0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openedx_tagging/core/tagging/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ def can_view_object_tag_taxonomy(user: UserType, taxonomy: Taxonomy) -> bool:
"""
Only enabled taxonomy and users with permission to view this taxonomy can view object tags
from that taxonomy.
This rule is different from can_view_taxonomy because it checks if the taxonomy is enabled.
"""
if not taxonomy:
return True

return taxonomy.cast().enabled and can_view_taxonomy(user, taxonomy)


Expand Down

0 comments on commit bc8efc0

Please sign in to comment.