diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/api/IndexProvisionApi.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/api/IndexProvisionApi.java index 001ce8669e8394ed01a88b533b5b76ad4a0d641d..f17b8810b2befd4748fe7c81daade7fce9e7d918 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/api/IndexProvisionApi.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/api/IndexProvisionApi.java @@ -1,3 +1,18 @@ +/* + * Copyright © Schlumberger + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.opengroup.osdu.indexer.api; import org.opengroup.osdu.core.common.model.search.SearchServiceRole; @@ -18,7 +33,7 @@ public class IndexProvisionApi { @Inject private IndexAliasService indexAliasService; - //@PreAuthorize("@authorizationFilter.hasPermission('" + SearchServiceRole.ADMIN + "')") + @PreAuthorize("@authorizationFilter.hasPermission('" + SearchServiceRole.ADMIN + "')") @PostMapping(path = "/aliases") public ResponseEntity<IndexAliasesResult> createIndexAliases() { return new ResponseEntity<>(indexAliasService.createIndexAliasesForAll(), HttpStatus.OK); diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/IndexAliasesResult.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/IndexAliasesResult.java index c10a50f7b49151524e2369c3f295018539f18e3e..c53f64d4ca68cb6f43709b2f6283f231f26f66b2 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/IndexAliasesResult.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/IndexAliasesResult.java @@ -1,3 +1,18 @@ +/* + * Copyright © Schlumberger + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.opengroup.osdu.indexer.model; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasService.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasService.java index bc3947da9ecfb36fc2126444ce5bcea1e1cbcb3e..a817d979f245c639d3576ab48eeab873d06d9736 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasService.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasService.java @@ -1,3 +1,18 @@ +/* + * Copyright © Schlumberger + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.opengroup.osdu.indexer.service; import org.elasticsearch.client.RestHighLevelClient; diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasServiceImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasServiceImpl.java index eb3f96ec50135da0e17693b629a21fb934825271..e09e98bced5a036b339b4748db16985d6ea4f5c4 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasServiceImpl.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright © Schlumberger + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.opengroup.osdu.indexer.service; import com.google.api.client.util.Strings;