code: def get_user_roles(self, user):
          
          memberShipRecords = AuthMembership.objects(creator=self.client, user=user).only('groups')
          results = []
          for each in memberShipRecords:
              for group in each.groups:
                  results.append({'role':group.role})
          return results
docs: get permissions of a user