broker/Topic: class added
broker/Topic: String Topics replaced by Topic class broker/Topic#parseTopic: access set to private broker/SubscriptionsStoreTest: topic tests moved to own class broker/TopicTest: containsExactly used broker/TopicTest: TopicAssert class added broker/TopicTest$TopicAssert#containsToken: method added broker/TopicTest$TopicAssert#matches: method added
This commit is contained in:
@@ -4,6 +4,7 @@ package io.moquette.spi.impl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import io.moquette.server.netty.NettyUtils;
|
||||
import io.moquette.spi.impl.subscriptions.Topic;
|
||||
import io.moquette.spi.security.IAuthorizator;
|
||||
import io.netty.channel.Channel;
|
||||
|
||||
@@ -17,7 +18,7 @@ abstract class QosPublishHandler {
|
||||
this.m_authorizator = m_authorizator;
|
||||
}
|
||||
|
||||
public boolean checkWriteOnTopic(String topic, Channel channel) {
|
||||
public boolean checkWriteOnTopic(Topic topic, Channel channel) {
|
||||
String clientID = NettyUtils.clientID(channel);
|
||||
String username = NettyUtils.userName(channel);
|
||||
if (!m_authorizator.canWrite(topic, username, clientID)) {
|
||||
|
||||
Reference in New Issue
Block a user