Closed Bug 858287 Opened 13 years ago Closed 13 years ago

access.acl shouldn't import Addon and Collection

Categories

(Marketplace Graveyard :: Code Quality, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2013-04-11

People

(Reporter: chuck, Assigned: andy+bugzilla)

References

Details

(Whiteboard: p=1)

Since `access.acl` imports the Addon and Collection models (which each import half of Zamboni), anything that imports it is prone to circular imports. I don't think the imports are necessary: the `isinstance` checks here in `check_ownership`: https://github.com/mozilla/zamboni/blob/e28b4993fe51bd5015b0ad2878995d283879be04/apps/access/acl.py#L39-57 could easily be replaced with hasattr checks for `check_addon_ownership` and `check_collection_ownership`.
My suggestion for a replacement is wrong, but if possible, we should find a way around those imports. They're very problematic.
Assignee: nobody → amckay
Whiteboard: p=1
Target Milestone: --- → 2013-04-11
Blocks: 848869
Grabbing this, as it's a quick fix and is blocking me on another bug.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.