def context(self, context):
    super(widget_with_perm, self).context(context)
    context.update({'has_change_permission': self.request.user.has_perm('xadmin.change_userwidget')})
def context(self, context):
    super(widget_with_perm, self).context(context)
    context.update({'has_change_permission': self.request.user.has_perm('xadmin.change_userwidget')})