package com.ozs.web.filter;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;
import com.ozs.common.utils.SecurityUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;


public class LogOutFilter extends Filter<ILoggingEvent> {


    @Override
    public FilterReply decide(ILoggingEvent event) {
        if (getFlay()) {
            return FilterReply.DENY;
        }
        return FilterReply.ACCEPT;
    }

    private boolean getFlay() {
        return LogOutUtil.getFlay();
    }

}
