Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
ARUHA-998 Fixes after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Montrieux committed Aug 31, 2017
1 parent 9864d05 commit db1c28e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/zalando/nakadi/config/NakadiSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/zalando/nakadi/service/AdminService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -46,7 +46,7 @@ public void updateAdmins(final List<Permission> newAdmins) {
public boolean isAdmin(final AuthorizationService.Operation operation) {
final List<Permission> permissions = getAdmins();
final Resource resource = new AdminResource(ADMIN_RESOURCE,
AdminAuthorization.fromPermissionsList(permissions));
ResourceAuthorization.fromPermissionsList(permissions));
return authorizationService.isAuthorized(operation, resource);
}

Expand Down

0 comments on commit db1c28e

Please sign in to comment.