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)
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`.
| Reporter | ||
Comment 1•13 years ago
|
||
My suggestion for a replacement is wrong, but if possible, we should find a way around those imports. They're very problematic.
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → amckay
Whiteboard: p=1
| Assignee | ||
Updated•13 years ago
|
Target Milestone: --- → 2013-04-11
| Reporter | ||
Comment 2•13 years ago
|
||
Grabbing this, as it's a quick fix and is blocking me on another bug.
| Reporter | ||
Comment 3•13 years ago
|
||
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.
Description
•