Skip to content

Commit

Permalink
make it readable
Browse files Browse the repository at this point in the history
  • Loading branch information
KannarFr committed May 11, 2021
1 parent bf775ac commit 8312908
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ public CompletableFuture<Boolean> canProduceAsync(TopicName topicName, String ro
verifier.set_time();
verifier.add_fact("topic(#ambient, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\")").get();
verifier.add_fact("topic_operation(#ambient, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\", #produce)").get();
verifier.add_rule("right(#authority, $tenant, $namespace, $topic, #produce) <- " +
"right(#authority, #admin), topic_operation(#ambient, $tenant, $namespace, $topic, #produce)").get();
verifier.add_rule("right(#authority, $tenant, $namespace, $topic, #produce) <- right(#authority, #admin), topic_operation(#ambient, $tenant, $namespace, $topic, #produce)").get();
verifier.add_check("check if right(#authority, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\", #produce)").get();
verifier.allow();

Expand Down Expand Up @@ -149,8 +148,7 @@ public CompletableFuture<Boolean> canConsumeAsync(TopicName topicName, String ro
verifier.set_time();
verifier.add_fact("topic(#ambient, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\")").get();
verifier.add_fact("topic_operation(#ambient, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\", #consume)").get();
verifier.add_rule("right(#authority, $tenant, $namespace, $topic, #consume) <- " +
"right(#authority, #admin), topic_operation(#ambient, $tenant, $namespace, $topic, #consume)").get();
verifier.add_rule("right(#authority, $tenant, $namespace, $topic, #consume) <- right(#authority, #admin), topic_operation(#ambient, $tenant, $namespace, $topic, #consume)").get();
verifier.add_check("check if right(#authority, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\", #consume)").get();
verifier.allow();

Expand Down Expand Up @@ -181,8 +179,7 @@ public CompletableFuture<Boolean> canLookupAsync(TopicName topicName, String rol
verifier.set_time();
verifier.add_fact("topic(#ambient, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\")").get();
verifier.add_fact("topic_operation(#ambient, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\", #lookup)").get();
verifier.add_rule("right(#authority, $tenant, $namespace, $topic, #lookup) <- " +
"right(#authority, #admin), topic_operation(#ambient, $tenant, $namespace, $topic, #lookup)").get();
verifier.add_rule("right(#authority, $tenant, $namespace, $topic, #lookup) <- right(#authority, #admin), topic_operation(#ambient, $tenant, $namespace, $topic, #lookup)").get();
verifier.add_check("check if right(#authority, \""+topicName.getTenant()+"\", \""+topicName.getNamespacePortion()+"\", \""+topicName.getLocalName()+"\", #lookup)").get();
verifier.allow();

Expand Down

0 comments on commit 8312908

Please sign in to comment.