public static PermissionConstraint orgConstraints(ISecurityContext securityContext, PermissionType permissionType) {
        return new PermissionConstraint()
                .setConstrained(!securityContext.isAdmin())
                .setAllowedDiscoverabilities(securityContext.getPermittedDiscoverabilities())
                .setPermittedOrgs(securityContext.getPermittedOrganizations(permissionType))
                .setPermissionType(permissionType);
    }
@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/util/PermissionsHelper.java