MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / canUserAccess

Function canUserAccess

client/src/components/TopNav.jsx:111–117  ·  view source on GitHub ↗
(role, teamData)

Source from the content-addressed store, hash-verified

109 }, []);
110
111 const canUserAccess = (role, teamData) => {
112 if (teamData) {
113 return canAccess(role, user.id, teamData.TeamRoles);
114 }
115
116 return canAccess(role, user.id, team.TeamRoles);
117 };
118
119 const isOnDashboard = () => location.pathname.startsWith("/dashboard/");
120 const isOnConnections = () => location.pathname.startsWith("/connections");

Callers 1

TopNavFunction · 0.85

Calls 1

canAccessFunction · 0.85

Tested by

no test coverage detected