aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Buttons.hx')
-rw-r--r--src/client/Buttons.hx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 56f28d5..f3a2474 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -228,7 +228,7 @@ class Buttons {
getEl("#voiceoverblock").style.display = (url.length > 0 && isSingle) ? "" : "none";
final isExternal = main.isExternalVideoUrl(url);
- final showCache = isSingle && isExternal
+ final showCache = main.isAdmin() && isSingle && isExternal
&& main.playersCacheSupport.contains(playerType);
checkboxCache.parentElement.style.display = showCache ? "" : "none";
checkboxCache.checked = settings.checkedCache.contains(playerType);
@@ -258,6 +258,10 @@ class Buttons {
}
getEl("#mediaurl-upload").onclick = e -> {
+ if (!main.isAdmin()) {
+ main.serverMessage("Only admins may upload files.", true, false);
+ return;
+ }
Utils.browseJsFile(file -> {
final uploader = new FileUploader(main);
uploader.uploadFile(file);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage