mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Fixed #26954 -- Prevented ModelAdmin.has_module_permission()=False from blocking access to the app index page.
This commit is contained in:
@@ -4,7 +4,7 @@ from django.apps import apps
|
||||
from django.conf import settings
|
||||
from django.contrib.admin import ModelAdmin, actions
|
||||
from django.contrib.auth import REDIRECT_FIELD_NAME
|
||||
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.db.models.base import ModelBase
|
||||
from django.http import Http404, HttpResponseRedirect
|
||||
from django.template.response import TemplateResponse
|
||||
@@ -399,8 +399,6 @@ class AdminSite(object):
|
||||
|
||||
has_module_perms = model_admin.has_module_permission(request)
|
||||
if not has_module_perms:
|
||||
if label:
|
||||
raise PermissionDenied
|
||||
continue
|
||||
|
||||
perms = model_admin.get_model_perms(request)
|
||||
|
||||
Reference in New Issue
Block a user