Examples of BanGuard


Examples of org.jresearch.gossip.am.ban.BanGuard

     *
     * @see javax.servlet.jsp.tagext.Tag#doStartTag()
     */
    public int doStartTag() throws JspException {
        eval();
        BanGuard guard;
        try {
            guard = BanGuard.getInstance();

            Boolean isBanned = new Boolean(guard.checkBan(this.login,
                    BanType.LOGIN));
            if (this.var != null) pageContext.setAttribute(var, isBanned);
            if (isBanned.booleanValue()) { return EVAL_BODY_INCLUDE; }
            return SKIP_BODY;
        } catch (SystemException e) {
View Full Code Here

Examples of org.jresearch.gossip.am.ban.BanGuard

                        config.get(IConst.CONFIG.SITE_NAME) };
                MailQueue queue = (MailQueue) session.getServletContext()
                        .getAttribute(IConst.CONTEXT.MAIL_QUEUE);

                Iterator it = subscrbe.iterator();
                BanGuard guard = BanGuard.getInstance();
                while (it.hasNext()) {
                    Subscriber s = (Subscriber) it.next();
                    if (!guard.checkBan(s.getEmail(), BanType.EMAIL)) {
                        messArgs[0] = HtmlCodec.encode(s.getName());

                        queue.push(new MailMessage(messages.getMessage(
                                "mails.NEW_MESSAGE", messArgs), messages
                                .getMessage("mails.NEW_MESSAGE_SUBJ"), config
View Full Code Here

Examples of org.jresearch.gossip.am.ban.BanGuard

                IConst.CONTEXT.MAIL_QUEUE);
        try {

            ArrayList userMails = dao.getUserEmails();
            Iterator it = userMails.iterator();
            BanGuard guard = BanGuard.getInstance();
            while (it.hasNext()) {
                NamedValue nv = (NamedValue) it.next();

                if (!guard.checkBan(nv.getValue(), BanType.EMAIL)
                        && !user.getName().equals(nv.getName())) {
                    messArgs[0] = nv.getName();
                    queue.push(new MailMessage(messages.getMessage(
                            "mails.ADMIN_MAIL", messArgs),
                            samForm.getSubject(), Configurator.getInstance()
View Full Code Here

Examples of org.jresearch.gossip.am.ban.BanGuard

        HttpServletRequest req = (HttpServletRequest) request;
        HttpSession session = req.getSession();
        User user = (User) session.getAttribute(
                IConst.SESSION.USER_KEY);
        try {
            BanGuard guard = BanGuard.getInstance();
            String forward = "";
            if (guard.checkBan(req.getRemoteAddr(), BanType.IP)) {
                forward = _denied;
            } else if (guard.checkBan(user.getName(), BanType.LOGIN)) {
                String uri = req.getRequestURI();
                int i = uri.lastIndexOf("/");
                if (i >= 0) {
                    uri = uri.substring(i);
                }
View Full Code Here

Examples of org.jresearch.gossip.am.ban.BanGuard

     * (non-Javadoc)
     *
     * @see javax.servlet.jsp.tagext.Tag#doStartTag()
     */
    public int doStartTag() throws JspException {
        BanGuard guard;
        try {
            Boolean isAlloved = haveAccess((HttpServletRequest) pageContext
                    .getRequest());
            if (this.var != null) pageContext.setAttribute(var, isAlloved);
            if (isAlloved.booleanValue()) { return EVAL_BODY_INCLUDE; }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.