Переглянути джерело

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

tags/v0.9.18
Jonathan Cobb 4 роки тому
джерело
коміт
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);
}



Завантаження…
Відмінити
Зберегти