from storage import StorableObject

class Role(StorableObject):
    _names = 'roles'
    name = None
    details = None
    emails = None

    def __init__(self, name = None):
        StorableObject.__init__(self)
        self.name = name

def logged_users_role():
    volatile_role = Role.volatile()
    volatile_role.id = 'logged-users'
    volatile_role.name = _('Logged Users')
    return volatile_role


def get_user_roles():
    return [(x.id, x.name) for x in Role.select()]
