Forgive me for not being so creative to choose better names ;)TrustedInterface.
This interface could have 2 functions: void runCloud(Cloud cloud); void runAsUser(UserContext context);
weird method names
modules must be able to get the cloud and not the reverse since clouds can get invalidWould one want to obtain a cloud, this can be easy done by using the following lines:
MyApplicationXClass extends TrustedInterface {
public void doCloudOperation() {
// notice the _this_ in the next line
MMBase.getMMBaseCop().GetAuthorization().runCloud("admin", "application-x", this);
}
void runCloud(Cloud cloud){
cloud.doSpecialApplicationXOperations();
}
}This way there will be a clear seperation between trusted and not trusted code.
When the cloud gets invalid, the cloud has to be obtained again, thus meaning that the security has to be checked again (the cloud can be set invalid by the security iirc)
-- Time is on my side,....
Eduard Witteveen +316 414 789 23
