Ticket #10609: action_permissions.patch
File action_permissions.patch, 754 bytes (added by , 16 years ago) |
---|
-
options.py
423 423 for klass in [self.admin_site] + self.__class__.mro()[::-1]: 424 424 for action in getattr(klass, 'actions', []): 425 425 func, name, description = self.get_action(action) 426 actions[name] = (func, name, description) 426 427 # check permission 428 test = getattr(func, "test_func", None) 429 if test == None or test(request.user): 430 actions[name] = (func, name, description) 427 431 return actions 428 432 429 433 def get_action_choices(self, request=None, default_choices=BLANK_CHOICE_DASH):