directus-extension-webhook-authentication
Version:
Directus Flows Operation to check webhook authorization
2 lines (1 loc) • 1.09 kB
JavaScript
const e=[{text:"Admin Only",value:"admin"},{text:"User or Admin",value:"user"},{text:"Public Access (no-op)",value:"noop"}];const t=[],i=[],o=[],l=[],n=[],c=[],s=[{id:"flows-check-auth",name:"Check Authentication",icon:"lock",description:"Checks whether a flow is triggered with authentication",overview:({level:t})=>{const i=t||"user";return[{label:"Required",text:(e.find((({value:e})=>e===i))||{text:"Error"}).text}]},options:[{field:"level",name:"Athentication Required",type:"string",schema:{default_value:"user"},meta:{field:"level",special:null,interface:"select-dropdown",options:{choices:e},width:"full"}}]},{id:"flows-check-perms",name:"Check Permissions",icon:"lock",description:"Checks whether a flow is triggered using a collections read permissions",overview:({collection:e})=>[{label:"$t:collection",text:e}],options:[{field:"collection",type:"string",name:"$t:collection",meta:{interface:"system-collection",options:{includeSystem:!0},width:"full",required:!0}}]}];export{i as displays,t as interfaces,o as layouts,l as modules,s as operations,n as panels,c as themes};