MCPcopy Create free account
hub / github.com/algorithm-visualizer/algorithm-visualizer / hasPermission

Function hasPermission

src/components/Header/index.js:85–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83 }
84
85 hasPermission() {
86 const { scratchPaper } = this.props.current;
87 const { user } = this.props.env;
88 if (!scratchPaper) return false;
89 if (scratchPaper.gistId !== 'new') {
90 if (!user) return false;
91 if (scratchPaper.login !== user.login) return false;
92 }
93 return true;
94 }
95
96 deleteGist() {
97 const { scratchPaper } = this.props.current;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected