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,15 +537,25 @@ 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().isEmpty()) {
|
if (env.getShubUsersExcluded() != null) {
|
||||||
return false;
|
if (env.getShubUsersExcluded().isEmpty()) {
|
||||||
}
|
// all users write
|
||||||
if (env.getShubUsersExcluded().contains(username)) {
|
return true;
|
||||||
|
}
|
||||||
|
if (env.getShubUsersExcluded().contains(username)) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
// username write
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//This is the * case, no users write.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void accountAlgorithmExecution(long start, long end, OperationResult result) {
|
private void accountAlgorithmExecution(long start, long end, OperationResult result) {
|
||||||
|
|
Loading…
Reference in New Issue