Просмотр исходного кода

allow access to nodeman resource when no password set, to allow setting password

tags/v0.9.18
Jonathan Cobb 4 лет назад
Родитель
Сommit
c21aaf9213
1 измененных файлов: 0 добавлений и 4 удалений
  1. +0
    -4
      bubble-server/src/main/java/bubble/resources/cloud/NodesResource.java

+ 0
- 4
bubble-server/src/main/java/bubble/resources/cloud/NodesResource.java Просмотреть файл

@@ -79,11 +79,7 @@ public class NodesResource extends ReadOnlyAccountOwnedResource<BubbleNode, Bubb
final Account caller = userPrincipal(ctx);
final BubbleNode node = super.find(ctx, id);
if (node == null) throw notFoundEx(id);

if (!caller.admin() && !caller.getUuid().equals(node.getAccount())) throw forbiddenEx();

if (!node.hasNodeManagerPassword()) throw invalidEx("err.nodemanager.noPasswordSet");

return configuration.subResource(NodeManagerResource.class, node);
}



Загрузка…
Отмена
Сохранить