Updated write exclusion behavior
This commit is contained in:
parent
6d74cf7fc3
commit
81c260646d
|
@ -53,12 +53,11 @@ public class AbstractEcologicalEngineMapper extends AbstractAnnotatedAlgorithm i
|
||||||
private static final int COMPUTATION_WAIT_FOR_RUN_REQUEST = 20000;
|
private static final int COMPUTATION_WAIT_FOR_RUN_REQUEST = 20000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deploying procedure: 1 - modify configuration files 2 - modify resource
|
* Deploying procedure: 1 - modify configuration files 2 - modify resource file:
|
||||||
* file: resources/templates/setup.cfg 3 - generate classes with
|
* resources/templates/setup.cfg 3 - generate classes with ClassGenerator 4 -
|
||||||
* ClassGenerator 4 - add new classes in the wps_config.xml on the wps web
|
* add new classes in the wps_config.xml on the wps web app config folder 5 -
|
||||||
* app config folder 5 - produce the Jar file of this project 6 - copy the
|
* produce the Jar file of this project 6 - copy the jar file in the lib folder
|
||||||
* jar file in the lib folder of the wps web app change the server
|
* of the wps web app change the server parameters in the wps_config.xml file
|
||||||
* parameters in the wps_config.xml file
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractEcologicalEngineMapper.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractEcologicalEngineMapper.class);
|
||||||
|
@ -538,16 +537,26 @@ public class AbstractEcologicalEngineMapper extends AbstractAnnotatedAlgorithm i
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkWriteAuthorization(String username) {
|
private boolean checkWriteAuthorization(String username) {
|
||||||
if (env != null && env.getShubUsersExcluded() != null) {
|
if (env != null) {
|
||||||
|
if (env.getShubUsersExcluded() != null) {
|
||||||
if (env.getShubUsersExcluded().isEmpty()) {
|
if (env.getShubUsersExcluded().isEmpty()) {
|
||||||
return false;
|
// all users write
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if (env.getShubUsersExcluded().contains(username)) {
|
if (env.getShubUsersExcluded().contains(username)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
} else {
|
||||||
}
|
// username write
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
//This is the * case, no users write.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void accountAlgorithmExecution(long start, long end, OperationResult result) {
|
private void accountAlgorithmExecution(long start, long end, OperationResult result) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue