lib/src/main/java/io/v/v23/syncbase/util/Util.java
/**
     * Returns a filtered copy of the given permissions, only including the tags specified.
     */
Returns a filtered copy of the given permissions, only including the tags specified.
Returns a filtered copy of the given permissions only including the tags specified .
public static Permissions filterPermissionsByTags(Permissions perms, Iterable<Tag> tags) {
        Permissions filtered = new Permissions();
        for (Tag tag: tags) {
            String tagStr = tag.getValue();
            AccessList acl = perms.get(tagStr);
            if (acl != null) {
                AccessList aclCopy = new AccessList(new ArrayList<>(acl.getIn()),
                        new ArrayList<>(acl.getNotIn()));
                filtered.put(tagStr, aclCopy);
            }
        }
        return filtered;
    }
public static Permissions filterPermissionsByTags ( Permissions perms , Iterable < Tag > tags ) { Permissions filtered = new Permissions ( ) ; for ( Tag tag : tags ) { String tagStr = tag . getValue ( ) ; AccessList acl = perms . get ( tagStr ) ; if ( acl != null ) { AccessList aclCopy = new AccessList ( new ArrayList < > ( acl . getIn ( ) ) , new ArrayList < > ( acl . getNotIn ( ) ) ) ; filtered . put ( tagStr , aclCopy ) ; } } return filtered ; }
Returns a filtered copy of the given permissions, only including the tags specified.
Returns a filtered copy of the given permissions only including the tags specified .