Search in sources :

Example 1 with AdminResource

use of org.zalando.nakadi.domain.AdminResource in project nakadi by zalando.

the class AdminService method isAdmin.

public boolean isAdmin(final AuthorizationService.Operation operation) {
    final List<Permission> permissions = getAdmins();
    final Resource resource = new AdminResource(ADMIN_RESOURCE, ResourceAuthorization.fromPermissionsList(permissions));
    return authorizationService.isAuthorized(operation, resource);
}
Also used : Permission(org.zalando.nakadi.domain.Permission) AllDataAccessResource(org.zalando.nakadi.domain.AllDataAccessResource) Resource(org.zalando.nakadi.plugin.api.authz.Resource) AdminResource(org.zalando.nakadi.domain.AdminResource) AdminResource(org.zalando.nakadi.domain.AdminResource)

Aggregations

AdminResource (org.zalando.nakadi.domain.AdminResource)1 AllDataAccessResource (org.zalando.nakadi.domain.AllDataAccessResource)1 Permission (org.zalando.nakadi.domain.Permission)1 Resource (org.zalando.nakadi.plugin.api.authz.Resource)1