Commit 6a783a1e authored by Fabien Viale's avatar Fabien Viale
Browse files

PCA permissions (fix equals)

 - fix equals usage in add/remove node tokens
parent be40d471
...@@ -3114,7 +3114,7 @@ public class RMCore implements ResourceManager, InitActive, RunActive { ...@@ -3114,7 +3114,7 @@ public class RMCore implements ResourceManager, InitActive, RunActive {
} }
if (allNodes.containsKey(nodeUrl)) { if (allNodes.containsKey(nodeUrl)) {
RMNode rmNode = allNodes.get(nodeUrl); RMNode rmNode = allNodes.get(nodeUrl);
if (rmNode.isBusy() && rmNode.getOwner() != null && rmNode.getOwner().equals(getCurrentUser())) { if (rmNode.isBusy() && rmNode.getOwner() != null && rmNode.getOwner().equals(caller)) {
// current user has the right to add a token to reserve it for further usage // current user has the right to add a token to reserve it for further usage
} else { } else {
// if not, check that the request initiator is a node administrator // if not, check that the request initiator is a node administrator
...@@ -3148,7 +3148,7 @@ public class RMCore implements ResourceManager, InitActive, RunActive { ...@@ -3148,7 +3148,7 @@ public class RMCore implements ResourceManager, InitActive, RunActive {
} }
if (allNodes.containsKey(nodeUrl)) { if (allNodes.containsKey(nodeUrl)) {
RMNode rmNode = allNodes.get(nodeUrl); RMNode rmNode = allNodes.get(nodeUrl);
if (rmNode.isBusy() && rmNode.getOwner() != null && rmNode.getOwner().equals(getCurrentUser())) { if (rmNode.isBusy() && rmNode.getOwner() != null && rmNode.getOwner().equals(caller)) {
// current user has the right to add a token to reserve it for further usage // current user has the right to add a token to reserve it for further usage
} else { } else {
checkNodeAdminPermission(rmNode, caller); checkNodeAdminPermission(rmNode, caller);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment