[Fix] throw exception after logging in StrolchSystemAction

This commit is contained in:
Robert von Burg 2018-05-16 17:52:44 +02:00
parent 1e616f0616
commit 710a989ce5
2 changed files with 8 additions and 11 deletions

View File

@ -27,6 +27,7 @@ public class StrolchSystemAction extends SystemAction {
} catch (Exception e) {
logger.error("Failed to execute SystemAction for " + privilegeContext.getUsername() + " due to " + e
.getMessage(), e);
throw e;
}
}
}

View File

@ -21,8 +21,7 @@ import li.strolch.privilege.model.Restrictable;
/**
* With this interface system actions, which are to be performed in an automated fashion, i.e. by cron jobs, can be
* implemented and then the authorized execution can be delegated to
* {@link PrivilegeHandler#runAsSystem(String, SystemAction)}
* implemented and then the authorized execution can be delegated to {@link PrivilegeHandler#runAs(String, SystemAction)}
*
* @author Robert von Burg <eitch@eitchnet.ch>
*/
@ -42,11 +41,8 @@ public abstract class SystemAction implements Restrictable {
* This method will be called by the {@link PrivilegeHandler} when an authorized {@link Certificate} has been
* generated to allow this action to properly validate its execution
*
* TODO: I'm not really happy with this... we might want to pass the certificate and then force the action to
* validate it to get the {@link PrivilegeContext} - we don't want the {@link PrivilegeContext} to live forever...
*
* @param privilegeContext
* the {@link PrivilegeContext} which was generated for a valid system user
* the {@link PrivilegeContext} which was generated for a valid system user
*/
public abstract void execute(PrivilegeContext privilegeContext);
}