Skip to content

Commit

Permalink
Remove copy token button form browsable api
Browse files Browse the repository at this point in the history
Button was meant to allow quick bebugging in curl.
But it is easily abused for loading data into other applications.
This update removes the button.
  • Loading branch information
Yrob committed Dec 19, 2024
1 parent 0b18504 commit a6b3b06
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/dso_api/static/dso_api/dynamic_api/js/browsable_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,6 @@ function setInfoBubble(element) {
expiredText = `Exp:${minutesRemaining}min`;
summary = `${token.preferred_username} ${isExpired?"Expired":expiredText} `;
infoEl.innerHTML = `<div class="summary">${summary}</div>`
infoEl.innerHTML += `<div title="copy token to clipboard" class="copy-to-clipboard" onclick="navigator.clipboard.writeText('${valueEl.value.substr(7)}')">&#x1F4CB;</div>`
infoEl.innerHTML += `<pre>${syntaxHighlight(JSON.stringify(token,null,4))}</pre>`;
infoEl.classList.remove("hidden");
} else {
Expand Down

0 comments on commit a6b3b06

Please sign in to comment.