'Custom Modules Menu'

@classmethod
def menu_modules(cls):

    from config import drk_default_shelter
    shelter_id = drk_default_shelter()
    has_role = current.auth.s3_has_role
    not_admin = (not has_role('ADMIN'))
    if (not_admin and has_role('SECURITY')):
        return [MM('Residents', c='security', f='person'), MM('Dashboard', c='cr', f='shelter', args=[shelter_id, 'profile'], check=(shelter_id is not None)), MM('Check-In    /    Check-Out', c='cr', f='shelter', args=[shelter_id, 'check-in'], check=(shelter_id is not None)), MM('Confiscation', c='security', f='seized_item')]
    elif (not_admin and has_role('QUARTIER')):
        return [MM('Residents', c=('dvr', 'cr'), f=('person', 'shelter_registration')), MM('Confiscation', c='security', f='seized_item')]
    else:
        return [MM('Residents', c=('dvr', 'pr')), MM('Event    Registration', c='dvr', f='case_event', m='register', p='create', check=(lambda this: (not this.preceding()[(-1)].check_permission()))), MM('Food    Distribution', c='dvr', f='case_event', m='register_food', p='create', check=(lambda this: (not this.preceding()[(-2)].check_permission()))), MM('Food    Distribution    Statistics', c='dvr', f='case_event', m='report', vars={'code': 'FOOD*'}, restrict=('FOOD_STATS',), check=(lambda this: (not this.preceding()[(-3)].check_permission()))), MM('ToDo', c='project', f='task'), MM('Dashboard', c='cr', f='shelter', args=[shelter_id, 'profile'], check=(shelter_id is not None)), MM('Housing    Units', c='cr', f='shelter', t='cr_shelter_unit', args=[shelter_id, 'shelter_unit'], check=(shelter_id is not None)), homepage('vol'), homepage('hrm'), MM('More', link=False)(MM('Facilities', c='org', f='facility'), homepage('inv'), SEP(link=False), MM('Confiscation', c='security', f='seized_item'), SEP(link=False), MM('Surplus    Meals', c='default', f='index', args='surplus_meals', t='dvr_case_event', restrict=('ADMINISTRATION', 'ADMIN_HEAD', 'INFO_POINT', 'RP')))]
