Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoboy- committed Jan 11, 2024
1 parent 8602491 commit edd8578
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ public CompletableFuture<Optional<Topic>> getTopic(final TopicName topicName, bo
private CompletableFuture<Optional<TopicPolicies>> getTopicPoliciesBypassSystemTopic(@Nonnull TopicName topicName) {
Objects.requireNonNull(topicName);
final ServiceConfiguration serviceConfiguration = pulsar.getConfiguration();
if (serviceConfiguration.isSystemTopicEnabled() && serviceConfiguration.isTopicLevelPoliciesEnabled()
if (serviceConfiguration.isSystemTopicAndTopicLevelPoliciesEnabled()
&& !NamespaceService.isSystemServiceNamespace(topicName.getNamespace())
&& !SystemTopicNames.isTopicPoliciesSystemTopic(topicName.toString())) {
return pulsar.getTopicPoliciesService().getTopicPoliciesAsync(topicName);
Expand Down Expand Up @@ -3446,7 +3446,7 @@ public boolean isSystemTopic(TopicName topicName) {
* @return TopicPolicies, if they exist. Otherwise, the value will not be present.
*/
public Optional<TopicPolicies> getTopicPolicies(TopicName topicName) {
if (!pulsar().getConfig().isTopicLevelPoliciesEnabled()) {
if (!pulsar().getConfig().isSystemTopicAndTopicLevelPoliciesEnabled()) {
return Optional.empty();
}
return Optional.ofNullable(pulsar.getTopicPoliciesService()
Expand All @@ -3455,7 +3455,7 @@ public Optional<TopicPolicies> getTopicPolicies(TopicName topicName) {

public CompletableFuture<Void> deleteTopicPolicies(TopicName topicName) {
final PulsarService pulsarService = pulsar();
if (!pulsarService.getConfig().isTopicLevelPoliciesEnabled()) {
if (!pulsarService.getConfig().isSystemTopicAndTopicLevelPoliciesEnabled()) {
return CompletableFuture.completedFuture(null);
}
return pulsar.getTopicPoliciesService()
Expand Down

0 comments on commit edd8578

Please sign in to comment.