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