Procházet zdrojové kódy

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

tags/v0.9.18
Jonathan Cobb před 4 roky
rodič
revize
c21aaf9213
1 změnil soubory, kde provedl 0 přidání a 4 odebrání
  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 Zobrazit soubor

@@ -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);
}



Načítá se…
Zrušit
Uložit