Closed Bug 1065784 Opened 10 years ago Closed 7 years ago

Remove Django admin

Categories

(Tree Management :: Treeherder, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdoglio, Assigned: emorley)

References

Details

Attachments

(1 file)

The following models should be removed from the admin site: - failure_classification - repository - repository_group - tasks
Blocks: 1065678
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Blocks: 1072681
No longer blocks: 1072681
Priority: P2 → P3
Priority: P3 → P5
Priority: P5 → P3
In fact I'm not really sure we use much of Django admin at all now (especially due to bug 1346740 and bug 1349182). Perhaps we can just disable the whole of Django admin? Our custom parts are here: https://github.com/mozilla/treeherder/blob/4d906bbead80f40fc1d2adef183767f66e279acd/treeherder/webapp/admin.py
See Also: → 1346740
Summary: Remove from the admin site those models that have a fixture file in the repo → Remove custom Django admin functionality (or disable admin entirely)
We only ever use the Django admin for: * approving pending credentials -> but this functionality is being removed in bug 1433011 * adjusting user permissions -> but (a) this is broken at the moment (bug 1346740) so we have to make manual DB edits regardless, and (b) we've moving to using scopes for permissions instead (bug 1273092) As such I think we should just remove it outright, particularly since it means we can close out bug 1346740 and bug 1315826 as wontfix.
Assignee: nobody → emorley
Status: NEW → ASSIGNED
Depends on: 1433011
Priority: P3 → P2
Summary: Remove custom Django admin functionality (or disable admin entirely) → Remove Django admin
Blocks: 1270157
Attachment #8945876 - Flags: review?(cdawson)
Attachment #8945876 - Flags: review?(cdawson) → review+
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/dcb2a3efb3367e1a4db53f8d3da5a4b2a098d730 Bug 1065784 - Remove Django admin (#3170) Since the only things we used it for were: * editing users - but that doesn't work any more (bug 1346740) so requires a manual DB edit as is it, and we won't need to edit users at all once LDAP groups are used for permissions (bug 1273092) * marking pending Hawk credentials as approved - however we're not accepting any new requests for Hawk credentials (bug 1433011) * resetting the secret key for Hawk credentials - however we've not used this feature once in the entire time we've used Hawk - and its trivial via MySQLWorkbench. As as added bonus removing Django admin: * reduces the work required to add a CSP header * speeds up `collectstatic` (which is run during deploy) by 30% * reduces the risk of giving `is_staff` permissions (which have to be given to sheriffs, but also allowed admin access) * reduces attack surface in general In addition to the Django admin app, `django.contrib.messages` app and the auth/messages context processors have been removed, since after bug 1433011, admin was the only remaining consumer of them: https://docs.djangoproject.com/en/1.11/ref/contrib/admin/
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: