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

Function hasDisplay

packages/ui/src/hooks/useAuth.jsx:34–51  ·  view source on GitHub ↗
(display)

Source from the content-addressed store, hash-verified

32 }
33
34 const hasDisplay = (display) => {
35 if (!display) {
36 return true
37 }
38
39 // if it has display flag, but user has no features, then it should not be displayed
40 if (!features || Array.isArray(features) || Object.keys(features).length === 0) {
41 return false
42 }
43
44 // check if the display flag is in the features
45 if (Object.hasOwnProperty.call(features, display)) {
46 const flag = features[display] === 'true' || features[display] === true
47 return flag
48 }
49
50 return false
51 }
52
53 return { hasPermission, hasAssignedWorkspace, hasDisplay }
54}

Callers 10

shouldDisplayMenuFunction · 0.85
DefaultRedirectFunction · 0.85
StyledPermissionButtonFunction · 0.85
PermissionIconButtonFunction · 0.85
PermissionButtonFunction · 0.85
PermissionTabFunction · 0.85
PermissionMenuItemFunction · 0.85
PermissionListItemButtonFunction · 0.85
PermissionLoadingButtonFunction · 0.85

Calls 1

callMethod · 0.45

Tested by

no test coverage detected