remove unused code
### Motivation
remove unused code in PersistentTopicsBase.
### Documentation
Need to update docs?
[x] `no-need-doc`
@@ -233,23 +233,6 @@ public class PersistentTopicsBase extends AdminResource {
}
}
- protected void validateAdminAndClientPermission() {
- try {
- validateAdminAccessForTenant(topicName.getTenant());
- } catch (Exception ve) {
- try {
- checkAuthorization(pulsar(), topicName, clientAppId(), clientAuthData());
- } catch (RestException re) {
- throw re;
- } catch (Exception e) {
- // unknown error marked as internal server error
- log.warn("Unexpected error while authorizing request. topic={}, role={}. Error: {}",
- topicName, clientAppId(), e.getMessage(), e);
- throw new RestException(e);
- }
- }
- }
-
protected void validateCreateTopic(TopicName topicName) {
if (isTransactionInternalName(topicName)) {
log.warn("Forbidden to create transaction internal topic: {}", topicName);
@@ -2613,16 +2596,6 @@ public class PersistentTopicsBase extends AdminResource {
}
}
- private void verifyReadOperation(boolean authoritative) {
- if (topicName.isGlobal()) {
- validateGlobalNamespaceOwnership(namespaceName);
- }
- PartitionedTopicMetadata partitionMetadata = getPartitionedTopicMetadata(topicName, authoritative, false);
- if (partitionMetadata.partitions > 0) {
- throw new RestException(Status.METHOD_NOT_ALLOWED, "Peek messages on a partitioned topic is not allowed");
- }
- }
-
private Response generateResponseWithEntry(Entry entry) throws IOException {
checkNotNull(entry);
PositionImpl pos = (PositionImpl) entry.getPosition();
