Skip to content

Commit

Permalink
Merge branch 'master' into sb-gradle-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
j-sandy authored Feb 28, 2022
2 parents a335c74 + c9eb62c commit 8643f1b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
java-version: 11
- uses: actions/cache@v1
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
distribution: 'zulu'
cache: 'gradle'
- name: Build
run: ./gradlew build --stacktrace
10 changes: 3 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
java-version: 11
- uses: actions/cache@v1
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
distribution: 'zulu'
cache: 'gradle'
- name: Build
run: ./gradlew build
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'
cache: 'gradle'
- name: Assemble release info
id: release_info
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class AuthConfig {
http
.requestMatcher(requestMatcherProvider.requestMatcher())
.authorizeRequests()
.antMatchers("/error").permitAll()
.antMatchers('/favicon.ico').permitAll()
.antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
.antMatchers(PermissionRevokingLogoutSuccessHandler.LOGGED_OUT_URL).permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ List<AccountDefinition> getAccountDefinitionsByType(
AccountDefinition updateAccountDefinition(@Body AccountDefinition accountDefinition);

@DELETE("/credentials/{account}")
void deleteAccountDefinition(@Path("account") String account);
Response deleteAccountDefinition(@Path("account") String account);

@GET("/task/{taskDetailsId}")
Map getTaskDetails(@Path("taskDetailsId") String taskDetailsId);
Expand Down Expand Up @@ -524,6 +524,7 @@ public void setCloudProvider(String cloudProvider) {
class AccountDefinition {
private final Map<String, Object> details = new HashMap<>();
private String type;
private String name;

@JsonAnyGetter
public Map<String, Object> details() {
Expand All @@ -544,5 +545,13 @@ public String getType() {
public void setType(String type) {
this.type = type;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CredentialsController {

@PutMapping
@ApiOperation('Updates an existing account definition.')
@PreAuthorize("hasPermission(#definition.name, 'ACCOUNT', 'WRITE')")
@PreAuthorize("hasPermission(#accountDefinition.name, 'ACCOUNT', 'WRITE')")
@Alpha
ClouddriverService.AccountDefinition updateAccount(
@ApiParam('Account definition body including a discriminator field named "@type" with the account type.')
Expand All @@ -132,7 +132,7 @@ class CredentialsController {
@DeleteMapping('/{accountName}')
@ApiOperation(value = 'Deletes an account definition by name.',
notes = 'Deleted accounts can be restored via the update API. Previously deleted accounts cannot be "created" again to avoid conflicts with existing pipelines.')
@PreAuthorize("hasPermission(#definition.name, 'ACCOUNT', 'WRITE')")
@PreAuthorize("hasPermission(#accountName, 'ACCOUNT', 'WRITE')")
@Alpha
void deleteAccount(
@ApiParam('Name of account definition to delete.')
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
enablePublishing=false
fiatVersion=1.27.1
includeProviders=basic,iap,ldap,oauth2,saml,x509
korkVersion=7.131.0
korkVersion=7.132.0
kotlinVersion=1.4.0
org.gradle.parallel=true
spinnakerGradleVersion=8.16.0
Expand Down

0 comments on commit 8643f1b

Please sign in to comment.