From db1c28e54dca42adf56e78fb5f3ca357a3f466f2 Mon Sep 17 00:00:00 2001 From: Lionel Montrieux Date: Thu, 31 Aug 2017 12:36:42 +0200 Subject: [PATCH] ARUHA-998 Fixes after merge --- src/main/java/org/zalando/nakadi/config/NakadiSettings.java | 4 ++-- src/main/java/org/zalando/nakadi/service/AdminService.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/zalando/nakadi/config/NakadiSettings.java b/src/main/java/org/zalando/nakadi/config/NakadiSettings.java index 382e20ebd1..166a6f4525 100644 --- a/src/main/java/org/zalando/nakadi/config/NakadiSettings.java +++ b/src/main/java/org/zalando/nakadi/config/NakadiSettings.java @@ -3,7 +3,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; -import org.zalando.nakadi.domain.AdminAuthorizationAttribute; +import org.zalando.nakadi.domain.ResourceAuthorizationAttribute; import org.zalando.nakadi.plugin.api.authz.AuthorizationAttribute; @Component @@ -47,7 +47,7 @@ public NakadiSettings(@Value("${nakadi.topic.max.partitionNum}") final int maxTo this.eventMaxBytes = eventMaxBytes; this.timelineWaitTimeoutMs = timelineWaitTimeoutMs; this.maxSubscriptionPartitions = maxSubscriptionPartitions; - this.defaultAdmin = new AdminAuthorizationAttribute(defaultAdminDataType, defaultAdminValue); + this.defaultAdmin = new ResourceAuthorizationAttribute(defaultAdminDataType, defaultAdminValue); } public int getDefaultTopicPartitionCount() { diff --git a/src/main/java/org/zalando/nakadi/service/AdminService.java b/src/main/java/org/zalando/nakadi/service/AdminService.java index 296e966606..0443873e4a 100644 --- a/src/main/java/org/zalando/nakadi/service/AdminService.java +++ b/src/main/java/org/zalando/nakadi/service/AdminService.java @@ -3,9 +3,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.zalando.nakadi.config.NakadiSettings; -import org.zalando.nakadi.domain.AdminAuthorization; import org.zalando.nakadi.domain.AdminResource; import org.zalando.nakadi.domain.Permission; +import org.zalando.nakadi.domain.ResourceAuthorization; import org.zalando.nakadi.plugin.api.authz.AuthorizationService; import org.zalando.nakadi.plugin.api.authz.Resource; import org.zalando.nakadi.repository.db.AuthorizationDbRepository; @@ -46,7 +46,7 @@ public void updateAdmins(final List newAdmins) { public boolean isAdmin(final AuthorizationService.Operation operation) { final List permissions = getAdmins(); final Resource resource = new AdminResource(ADMIN_RESOURCE, - AdminAuthorization.fromPermissionsList(permissions)); + ResourceAuthorization.fromPermissionsList(permissions)); return authorizationService.isAuthorized(operation, resource); }