Skip to content

Commit

Permalink
chore(dependencies): externalize versions to properties (#408)
Browse files Browse the repository at this point in the history
updates kork to 5.3.4
updates spinnaker-gradle-plugin to 6.5.0
  • Loading branch information
cfieber authored May 20, 2019
1 parent bdc3367 commit 737003b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@
*/

buildscript {
ext {
korkVersion = "5.0.0"
}
repositories {
jcenter()
maven { url "https://spinnaker.bintray.com/gradle" }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.netflix.spinnaker.gradle:spinnaker-dev-plugin:6.3.0'
classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:$spinnakerGradleVersion"
if (Boolean.valueOf(enablePublishing)) {
classpath 'com.netflix.spinnaker.gradle:spinnaker-gradle-project:6.3.0'
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:$spinnakerGradleVersion"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ class FiatPermissionEvaluatorSpec extends Specification {
@Unroll
def "should support legacy fallback when fiat is unavailable"() {
given:
MDC.put(AuthenticatedRequest.SPINNAKER_USER, "fallback")
MDC.put(AuthenticatedRequest.SPINNAKER_ACCOUNTS, "account1,account2")
MDC.put(AuthenticatedRequest.Header.USER.header, "fallback")
MDC.put(AuthenticatedRequest.Header.ACCOUNTS.header, "account1,account2")

when:
def permission = evaluator.getPermission("testUser")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.stream.Collectors;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

Expand Down Expand Up @@ -74,7 +73,7 @@ private Predicate<ServiceAccount> getServiceAccountPredicate(
return svcAcct -> true;
}
if (fiatRoleConfig.isOrMode()) {
return svcAcct -> CollectionUtils.intersection(roleNames, svcAcct.getMemberOf()).size() > 0;
return svcAcct -> svcAcct.getMemberOf().stream().anyMatch(roleNames::contains);
} else {
return svcAcct -> roleNames.containsAll(svcAcct.getMemberOf());
}
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
org.gradle.parallel=true
includeProviders=file,github,google-groups,ldap
enablePublishing=false
korkVersion=5.3.4
spinnakerGradleVersion=6.5.0

0 comments on commit 737003b

Please sign in to comment.