Skip to content

Instantly share code, notes, and snippets.

@sinistag
sinistag / patch_admin_permissions_list.py
Last active May 16, 2018 08:16 — forked from vdboor/patch_admin_permissions_list.py
Patch Django admin to hide useless default permissions.Import this file somewhere in an `__init__.py` or `admin.py` file.
"""
Hide permission in the Django admin which are irrelevant, and not used at all.
"""
from django.contrib import admin
from django.contrib.auth.admin import GroupAdmin, UserAdmin
from django.contrib.auth.models import Group, User
class PermissionFilterMixin(object):
def formfield_for_manytomany(self, db_field, request=None, **kwargs):
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDP+CJKmK6jOZ9sXIQ/RHWJJDsI5TorPSTZ8MX04XcgUA3S1BzkztcHL1RmZ/hOtsEcvExUtlF2VIHDxw46PlRT1G+jLousix2S1Nqh8mW6NUhAee60ShPGo+U270jUTTy/dCoDvUcZ/rCqk8+CxAA4FRMNbyEjESdFB2zLfTAfhn7KhKKnzRGcLpOOYU82mb7H45ylP7n+wWa842NexlBY623blFLSz7FZcRgCG/YJ6QGdL8tb9Y/lAyX6htq5RkUjl7zMiXkggeidHevZHROfsQwVALqzP9R6AkY4m6UUnOdM2ucSTEO2Uoe8+1HIJFN759OW8n1FtJpZBvhvB6kL elio@MacBook-Pro-dElio.local
This file has been truncated, but you can view the full file.
2016-12-28 00:00:00.0444 Info App: Application version: 3.1.1.0
2016-12-28 00:00:00.0781 Info App: Emby
Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartpath /usr/lib/emby-server/restart.sh
Operating system: Unix 4.8.8.300
64-Bit OS: True
64-Bit Process: True
Mono: 4.6.2 (Stable 4.6.2.7/08fd525 Tue Nov 29 22:26:00 UTC 2016)
Processor count: 8
Program data path: /var/lib/emby-server
Application directory: /usr/lib/emby-server/bin