def _get_all_permissions(opts):
    "Returns (codename, name) for all permissions in the given opts."
    perms = []
    for action in ('add', 'change', 'delete'):
        perms.append((_get_permission_codename(action, opts), u'Can %s %s' % (action, opts.verbose_name_raw)))
    return perms + opts.permissions

#code => <collection>.code
#lookup code => dockit.<collection>.code
#content type = DockitPermission

#user.has_perm(dockit.somecollection.code)
dataset/ETHPy150Open zbyte64/django-dockit/dockit/auth.py/_get_all_permissions/original