MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / Available

Function Available

packages/ui/src/ui-component/rbac/available.jsx:4–9  ·  view source on GitHub ↗
({ permission, children })

Source from the content-addressed store, hash-verified

2import { useAuth } from '@/hooks/useAuth'
3
4export const Available = ({ permission, children }) => {
5 const { hasPermission } = useAuth()
6 if (hasPermission(permission)) {
7 return children
8 }
9}
10
11Available.propTypes = {
12 permission: PropTypes.string,

Callers

nothing calls this directly

Calls 2

useAuthFunction · 0.90
hasPermissionFunction · 0.85

Tested by

no test coverage detected