diff --git a/django/contrib/auth/management.py b/django/contrib/auth/management.py
index 2b4cb8b..d0030b9 100644
a
|
b
|
def _get_permission_codename(action, opts):
|
12 | 12 | def _get_all_permissions(opts): |
13 | 13 | "Returns (codename, name) for all permissions in the given opts." |
14 | 14 | perms = [] |
15 | | for action in ('add', 'change', 'delete'): |
16 | | perms.append((_get_permission_codename(action, opts), u'Can %s %s' % (action, opts.verbose_name_raw))) |
| 15 | if opts.admin: |
| 16 | for action in ('add', 'change', 'delete'): |
| 17 | perms.append((_get_permission_codename(action, opts), u'Can %s %s' % (action, opts.verbose_name_raw))) |
17 | 18 | return perms + list(opts.permissions) |
18 | 19 | |
19 | 20 | def create_permissions(app, created_models, verbosity): |