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

Function PermissionMenuItem

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

Source from the content-addressed store, hash-verified

55}
56
57export const PermissionMenuItem = ({ permissionId, display, ...props }) => {
58 const { hasPermission, hasDisplay } = useAuth()
59
60 if (!hasPermission(permissionId) || !hasDisplay(display)) {
61 return null
62 }
63
64 return <MenuItem {...props} />
65}
66
67export const PermissionListItemButton = ({ permissionId, display, ...props }) => {
68 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