MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / PermissionButton

Function PermissionButton

packages/ui/src/ui-component/button/RBACButtons.jsx:37–45  ·  view source on GitHub ↗
({ permissionId, display, ...props })

Source from the content-addressed store, hash-verified

35}
36
37export const PermissionButton = ({ permissionId, display, ...props }) => {
38 const { hasPermission, hasDisplay } = useAuth()
39
40 if (!hasPermission(permissionId) || !hasDisplay(display)) {
41 return null
42 }
43
44 return <Button {...props} />
45}
46
47export const PermissionTab = ({ permissionId, display, ...props }) => {
48 const { hasPermission, hasDisplay } = useAuth()

Callers

nothing calls this directly

Calls 3

useAuthFunction · 0.90
hasPermissionFunction · 0.85
hasDisplayFunction · 0.85

Tested by

no test coverage detected