

def determine_rights(type, name):
    rl = Rights()
    if (type == 'user'):
        rl.add('refresh')
        rl.add('resolve')
        rl.add('info')
    elif (type in ['sa', 'authority+sa']):
        rl.add('authority')
        rl.add('sa')
    elif (type in ['ma', 'authority+ma', 'cm', 'authority+cm', 'sm', 'authority+sm']):
        rl.add('authority')
        rl.add('ma')
    elif (type == 'authority'):
        rl.add('authority')
        rl.add('sa')
        name.add('ma')
    elif (type == 'slice'):
        rl.add('refresh')
        rl.add('embed')
        rl.add('bind')
        rl.add('control')
        rl.add('info')
    elif (type == 'component'):
        rl.add('operator')
    return rl

dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/ext/sfa/trust/rights.py determine_rights/VarMisuse@136/190 `rl`->`name`