@property
    def role(self):
        """Return user role."""
        if self.is_superuser:
            return "SuperAdmins"
        try:
            return self.groups.all()[0].name
        except __HOLE__:
            return "---"
dataset/ETHPy150Open tonioo/modoboa/modoboa/core/models.py/User.role