

def vol(self):
    ' Volunteer Management '
    s3 = current.session.s3
    ADMIN = s3.system_roles.ADMIN
    manager_mode = (lambda i: (s3.hrm.mode is None))
    personal_mode = (lambda i: (settings.hrm.mode is not None))
    is_org_admin = (lambda i: ((s3.hrm.orgs and True) or (ADMIN in s3.roles)))
    settings = current.deployment_settings
    teams = settings.get_hrm_teams()
    use_teams = (lambda i: teams)
    return M(c='vol')(M('Volunteers', f='volunteer', check=[manager_mode])(M('Create Volunteer', m='create'), M('Import', f='person', m='import', vars={
        'group': 'volunteer',
    }, p='create')), M(teams, f='group', check=[manager_mode, use_teams])(M('Create Team', m='create'), M('Search Members', f='group_membership')), M('Training Events', f='training_event', check=manager_mode)(M('Create Event', m='create'), M('Search Training Participants', f='training'), M('Import Participant List', f='training', m='import')), M('Training Course Catalog', f='course', check=manager_mode)(M('Create Course', m='create')), M('Certificate Catalog', f='certificate', check=manager_mode)(M('Create Certificate', m='create')), M('Reports', f='volunteer', m='report', check=manager_mode)(M('Volunteer Report', m='report'), M('Training Report', f='training', m='report')), M('Volunteer Management', f='index', check=[personal_mode, is_org_admin]))

dataset/ETHPy150Open sahana/eden/modules/templates/CERT/menus.py S3OptionsMenu.vol/VarMisuse@52/66 `s3`->`settings`