mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
Возможность сделать опциональные моды только для админов
This commit is contained in:
parent
02c82745d0
commit
104ece2be4
4 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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) //Есть ли описание?
|
||||
|
|
|
@ -114,6 +114,8 @@ public static class OptionalFile {
|
|||
@LauncherAPI
|
||||
public int subTreeLevel = 1;
|
||||
@LauncherAPI
|
||||
public boolean isAdminOnly = false;
|
||||
@LauncherAPI
|
||||
public transient Set<OptionalFile> dependenciesCount;
|
||||
|
||||
public OptionalFile(String file, boolean mark) {
|
||||
|
@ -261,7 +263,6 @@ public void updateOptionalGraph()
|
|||
file.conflict[i] = getOptionalFile(file.conflictFile[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
|||
Subproject commit ec1431605c4951ace5cbd2ab392b67cea25bddd5
|
||||
Subproject commit 09a3e87500b775e48d374d30c40acef55c88774a
|
Loading…
Reference in a new issue