treeeditor/admin.py
def has_change_permission(self, request, obj=None):
        """
        Implement a lookup for object level permissions. Basically the same as
        ModelAdmin.has_change_permission, but also passes the obj parameter in.
        """
        if settings.TREE_EDITOR_OBJECT_PERMISSIONS:
            opts = self.opts
            r = request.user.has_perm(opts.app_label + '.' + opts.get_change_permission(), obj)
        else:
            r = True

        return r and super(TreeEditor, self).has_change_permission(request, obj)
def has_change_permission(self, request, obj=None):
        if settings.TREE_EDITOR_OBJECT_PERMISSIONS:
            opts = self.opts
            r = request.user.has_perm(opts.app_label + '.' + opts.get_change_permission(), obj)
        else:
            r = True

        return r and super(TreeEditor, self).has_change_permission(request, obj)
def has_change_permission ( self , request , obj = None ) : if settings . TREE_EDITOR_OBJECT_PERMISSIONS : opts = self . opts r = request . user . has_perm ( opts . app_label + '.' + opts . get_change_permission ( ) , obj ) else : r = True return r and super ( TreeEditor , self ) . has_change_permission ( request , obj )
Implement a lookup for object level permissions. Basically the same as
        ModelAdmin.has_change_permission, but also passes the obj parameter in.
Implement a lookup for object level permissions . Basically the same as ModelAdmin . has_change_permission but also passes the obj parameter in .