Example #1
0
def they_can_get_saksvedlegg(user, they):
    if is_saksbehandler(user) or is_godkjenner(user):
        they.can(GET, 'Saksvedlegg')
Example #2
0
def is_godkjenner_for_tilskuddsordning(tilskuddsordning, user):
    return (is_godkjenner(user)
            and user.get('id') == tilskuddsordning.godkjenner_id)
Example #3
0
def they_can_get_tilskuddsordninger(user, they):
    if is_administrator(user) or is_saksbehandler(user) or is_godkjenner(user):
        they.can(GET, 'Tilskuddsordning')
    elif is_soker(user):
        they.can(GET, 'Tilskuddsordning', if_tilskuddsordning_is_published)
Example #4
0
def they_can_get_rapport(user, they):
    if is_saksbehandler(user) or is_godkjenner(user):
        they.can(GET, 'Rapport', partial(if_soknad_is_not_in_status_rapport_pabegynt))
    else:
        they.can(GET, 'Rapport', partial(if_rapport_owner, user=user))
Example #5
0
def they_can_get_soknader(user, they):
    if is_saksbehandler(user) or is_godkjenner(user):
        they.can(GET, 'Soknad', partial(if_soknad_is_not_kladd))
    elif is_soker(user):
        they.can(GET, 'Soknad', partial(if_soker_can_manage_soknad, user=user))
Example #6
0
def they_can_get_generated_vedtaksbrev(user, they):
    if is_saksbehandler(user) or is_godkjenner(user):
        they.can(GET, 'GeneratedVedtaksbrev')
Example #7
0
def they_can_get_erv_file(user, they):
    if is_saksbehandler(user) or is_godkjenner(user):
        they.can(GET, 'ErvFile')