1"use strict";(globalThis.webpackChunkdeepstreamio_github_io||=[]).push([[7729],{6500(e,s,t){t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"guides/live-progress-bar/permissions","title":"Permissions","description":"Step three: Restricting who can emit events","source":"@site/docs/20-guides/live-progress-bar/50-permissions.md","sourceDirName":"20-guides/live-progress-bar","slug":"/guides/live-progress-bar/permissions","permalink":"/docs/guides/live-progress-bar/permissions","draft":false,"unlisted":false,"editUrl":"https://github.com/deepstreamIO/deepstreamIO.github.io/docs/20-guides/live-progress-bar/50-permissions.md","tags":[],"version":"current","sidebarPosition":50,"frontMatter":{"title":"Permissions","description":"Step three: Restricting who can emit events"},"sidebar":"tutorialSidebar","previous":{"title":"Visualizing in the frontend","permalink":"/docs/guides/live-progress-bar/visualizing-in-the-frontend"},"next":{"title":"Summary and extra tasks","permalink":"/docs/guides/live-progress-bar/conclusion"}}');var n=t(4848),r=t(8453);const o={title:"Permissions",description:"Step three: Restricting who can emit events"},a=void 0,c={},d=[];function l(e){const s={code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.p,{children:"Since the application logic is quite tiny, all we need to do here is limit only the backend servers to emit events."}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-yaml",children:"event:\n '*':\n subscribe: \"true\"\n emit: \"server.data.role === 'admin'\"\n"})})]})}function p(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453(e,s,t){t.d(s,{R:()=>o,x:()=>a});var i=t(6540);const n={},r=i.createContext(n);function o(e){const s=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),i.createElement(r.Provider,{value:s},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.