mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 10:18:57 +00:00
Fix the checking pattern function
This commit is contained in:
parent
a5e6f29c27
commit
b0306f6479
@ -278,9 +278,9 @@ module.exports = (server, options) => {
|
||||
try {
|
||||
const allow = await elasticRequest.callWithRequest(req,'search', {
|
||||
index: item.title,
|
||||
type : 'doc'
|
||||
type : 'wazuh'
|
||||
});
|
||||
finalList.push(item);
|
||||
if(allow && allow.hits && allow.hits.total >= 1) finalList.push(item);
|
||||
} catch (error){
|
||||
console.log(`Some user trys to fetch the index pattern ${item.title} without permissions`)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user