class OperationAuthoriser implements GraphHook {

    @Override
    public void preExecute(final OperationChain<?> opChain, final Context context) {
        if (null != opChain) {
            for (final Operation operation : opChain.getOperations()) {
                authorise(operation, context.getUser());
            }
            authorise(opChain, context.getUser());
        }
    }

}