From 104ece2be411eed289b8f21f7486da0642c972ef Mon Sep 17 00:00:00 2001 From: Gravit Date: Fri, 4 Jan 2019 23:01:45 +0700 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BE=D0=BF=D1=86=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D0=BC=D0=BE=D0=B4=D1=8B=20=D1=82=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=B4=D0=BB=D1=8F=20=D0=B0=D0=B4?= =?UTF-8?q?=D0=BC=D0=B8=D0=BD=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Launcher/runtime/dialog/dialog.js | 2 +- Launcher/runtime/dialog/overlay/options/options.js | 3 ++- .../main/java/ru/gravit/launcher/profiles/ClientProfile.java | 3 ++- modules | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index e932224d..2244711f 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -214,7 +214,7 @@ function doAuth(login, rsaPassword) { processing.resetOverlay(); overlay.show(processing.overlay, function (event) { makeAuthRequest(login, rsaPassword, function (result) { - loginData = { pp: result.pp , accessToken: result.accessToken}; + loginData = { pp: result.pp , accessToken: result.accessToken, permissions: result.permissions}; overlay.hide(0, function () { setCurrentScene(menuScene); diff --git a/Launcher/runtime/dialog/overlay/options/options.js b/Launcher/runtime/dialog/overlay/options/options.js index 0dc8848b..282a63fa 100644 --- a/Launcher/runtime/dialog/overlay/options/options.js +++ b/Launcher/runtime/dialog/overlay/options/options.js @@ -102,7 +102,8 @@ var options = { dModsIds.push(modFile.string); var modName = modFile.file, modDescription = "", subLevel = 1; - + if(modFile.isAdminOnly && !loginData.permissions.canAdmin) + return; if(modFile.name != null)//Есть ли у модификации имя? modName = modFile.name; if(modFile.info != null) //Есть ли описание? diff --git a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java index 1fb96754..06862a2b 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java @@ -114,6 +114,8 @@ public static class OptionalFile { @LauncherAPI public int subTreeLevel = 1; @LauncherAPI + public boolean isAdminOnly = false; + @LauncherAPI public transient Set dependenciesCount; public OptionalFile(String file, boolean mark) { @@ -261,7 +263,6 @@ public void updateOptionalGraph() file.conflict[i] = getOptionalFile(file.conflictFile[i]); } } - } } diff --git a/modules b/modules index ec143160..09a3e875 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit ec1431605c4951ace5cbd2ab392b67cea25bddd5 +Subproject commit 09a3e87500b775e48d374d30c40acef55c88774a