def _filter_perms(available_perms, perms):
    ret = []
    for perm in perms:
        if perm in available_perms:
            ret.append(perm)
    return ret
dataset/ETHPy150Open stackdio/stackdio/stackdio/core/viewsets.py/_filter_perms/original