title: allow users in a specific group to change posts UserPassesTestMixin
body: <p>I have a user and a group called Manager. How do I allow a user in the Manager group to change a post that's not theirs?</p>
  <p>Here's my code so far</p>
  <pre><code>class UserAccessMixin(UserPassesTestMixin):
      def test_func(self, user):
          issue = self.get_object()
          mod = user.get_object()
  
          if self.request.user == issue.author:
              return True
          elif user.object.user == mod.groups.filter(name='Manager').exists():
              return True
          return False
  </code></pre>
  <p>And my models</p>
  <pre><code>class Issue(models.Model):
      MARK_AS = ((True, 'Open'), (False, 'Closed'))
  
      title = models.CharField(max_length=100)
      content = models.TextField()
      date_posted = models.DateTimeField(default=timezone.now)
      author = models.ForeignKey(User, on_delete=models.CASCADE)
      assignee = models.ForeignKey(Profile, on_delete=models.SET_NULL, null=True, blank=True)
      mark_as = models.BooleanField(choices=MARK_AS, default=True)
      
  
      def __str__(self):
          return self.title
  
  
      def get_absolute_url(self):
          return reverse('issue-detail', kwargs={'pk': self.pk})
  </code></pre>
  <p>I get the error <code>UserAccessMixin.test_func() missing 1 required positional argument: 'user'</code></p>
  <p>Where do I go from here?</p>