|
|
|
@ -21,6 +21,8 @@ public class RemoteWorkspace implements Workspace {
|
|
|
|
|
|
|
|
|
|
private final WorkspaceConnectionInfo connection; |
|
|
|
|
|
|
|
|
|
private volatile Boolean isRoot = null; |
|
|
|
|
|
|
|
|
|
RemoteWorkspace(WorkspaceClient client, WorkspaceConnectionInfo connection) { |
|
|
|
|
|
|
|
|
|
this.client = client; |
|
|
|
@ -54,11 +56,15 @@ public class RemoteWorkspace implements Workspace {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean isRoot() { |
|
|
|
|
try { |
|
|
|
|
return WorkContext.getCurrent().get(DecisionOperator.class).isRoot(getConnection().getUserName()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
if (isRoot == null) { |
|
|
|
|
synchronized (this) { |
|
|
|
|
if (isRoot == null) { |
|
|
|
|
isRoot = WorkContext.getCurrent().get(DecisionOperator.class).isRoot(getConnection().getUserName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return isRoot; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|