Return True if the given request has permission to change the given Django model instance, the default implementation doesn't examine the `obj` parameter. Can be overridden by the user in subclasses. In such case it should return True if the given request ha
(self, request, obj=None)
| 613 | return request.user.has_perm("%s.%s" % (opts.app_label, codename)) |
| 614 | |
| 615 | def has_change_permission(self, request, obj=None): |
| 616 | """ |
| 617 | Return True if the given request has permission to change the given |
| 618 | Django model instance, the default implementation doesn't examine the |
| 619 | `obj` parameter. |
| 620 | |
| 621 | Can be overridden by the user in subclasses. In such case it should |
| 622 | return True if the given request has permission to change the `obj` |
| 623 | model instance. If `obj` is None, this should return True if the given |
| 624 | request has permission to change *any* object of the given type. |
| 625 | """ |
| 626 | opts = self.opts |
| 627 | codename = get_permission_codename("change", opts) |
| 628 | return request.user.has_perm("%s.%s" % (opts.app_label, codename)) |
| 629 | |
| 630 | def has_delete_permission(self, request, obj=None): |
| 631 | """ |
no test coverage detected