1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 04:54:18 +00:00

🔧 Display buttons only for repository admin

This commit is contained in:
Steffo 2021-05-28 14:31:26 +02:00
parent ff53692ca3
commit 009cfa49f6
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -50,11 +50,11 @@ export default function BoxRepositories(
key={repo["id"]}
repo={repo}
view={view ? () => view(repo["id"]) : null}
alerts={alerts ? () => alerts(repo["id"]) : null}
alerts={(alerts && user["email"] === repo["owner"]["email"]) ? () => alerts(repo["id"]) : null}
share={(share && user["email"] === repo["owner"]["email"]) ? () => share(repo["id"]) : null}
archive={archive ? () => archive(repo["id"]) : null}
edit={edit ? () => edit(repo["id"]) : null}
destroy={destroy ? () => destroy(repo["id"]) : null}
archive={(archive && user["email"] === repo["owner"]["email"]) ? () => archive(repo["id"]) : null}
edit={(edit && user["email"] === repo["owner"]["email"]) ? () => edit(repo["id"]) : null}
destroy={(destroy && user["email"] === repo["owner"]["email"]) ? () => destroy(repo["id"]) : null}
running={running}
/>
))