}
public getAuthorizedTags(file: string): string[] {
- if (!this.hasTags(file)) {
+ if (this.hasTags(file) === false) {
this.setTags(file, this.getAuthorizedTagsFromFile(file));
// Monitor authorization file
- !this.FSWatchers.has(file) &&
+ this.FSWatchers.has(file) === false &&
this.FSWatchers.set(
file,
FileUtils.watchJsonFile(
if (filename && event === 'change') {
try {
logger.debug(
- this.logPrefix(file) +
- ' ' +
- FileType.Authorization +
- ' file have changed, reload'
+ `${this.logPrefix(file)} ${FileType.Authorization} file have changed, reload`
);
this.deleteTags(file);
this.deleteFSWatcher(file);
return this.getTags(file);
}
+ public deleteAuthorizedTags(file: string): boolean {
+ return this.deleteTags(file);
+ }
+
private hasTags(file: string): boolean {
return this.tagsCaches.has(file);
}
);
}
} else {
- logger.info(this.logPrefix(file) + ' No authorization file given)');
+ logger.info(`${this.logPrefix(file)} No authorization file given`);
}
return authorizedTags;
}