Open diox opened 2 years ago
it should be broken down into smaller functions imo, and/or renamed. For example the default is to allow anyone with edit permission too, so it could be can_edit_addon
or something, and then something more specific in the other case. (I've not looked into everywhere it's used though)
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-98
In https://github.com/mozilla/addons/issues/8763 most acl checks were renamed and had their parameters changed to receive a
user
instead of arequest
to be more consistent.check_addon_ownership()
was not touched because it's a bigger issue, but we should look into it. The main problem is that its name is poor: it checks ownership by default, but also allows users with a specific permissions, or even regular non-owner authors if a parameter is passed. So it can't just be renamed tois_addon_owner()
or something like that... Maybe its functionality should be split ?┆Issue is synchronized with this Jira Task