class FileAccessService {

    public boolean isUserHasAccess(String userId, File file) {
        if (isOwner(userId, file)) return true;
        if (isUserHasAtLeastGivenPermission(userId, file, Permission.GET_AND_DELETE, Permission.GET)) return true;
        return false;
    }

}