Examples of adminAuthenticated()


Examples of de.anomic.search.Switchboard.adminAuthenticated()

                } else {
                    prop.put("in_domains", 0);
                    prop.put("in", 1);
                }
            }
        } else if (sb.adminAuthenticated(header) >= 2) {
            // show a complete list of link structure informations in case that the user is authenticated
            final boolean latest = ((post == null) ? false : post.containsKey("latest"));
            final Iterator<WebStructureGraph.StructureEntry> i = sb.webStructure.structureEntryIterator(latest);
            int c = 0;
            WebStructureGraph.StructureEntry sentry;
View Full Code Here

Examples of de.anomic.search.Switchboard.adminAuthenticated()

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        final Switchboard sb = (Switchboard) env;
        final serverObjects prop = new serverObjects();
       
        final boolean authenticated = sb.adminAuthenticated(header) >= 2;
        final int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);
        prop.put("display", display);
       
        final boolean showScore = ((post != null) && (post.containsKey("score")));
       
View Full Code Here

Examples of de.anomic.search.Switchboard.adminAuthenticated()

public class ViewProfile {

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        final serverObjects prop = new serverObjects();
        final Switchboard sb = (Switchboard) env;
        final boolean authenticated = sb.adminAuthenticated(header) >= 2;
        final int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);
        prop.put("display", display);
        prop.put("edit", authenticated ? 1 : 0);
        final String hash = (post == null) ? null : post.get("hash");
       
View Full Code Here

Examples of de.anomic.search.Switchboard.adminAuthenticated()

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        final Switchboard sb = (Switchboard) env;
        final serverObjects prop = new serverObjects();
       
        final boolean authenticated = sb.adminAuthenticated(header) >= 2;
        final int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);
        prop.put("display", display);
       
        final boolean showScore = ((post != null) && (post.containsKey("score")));
       
View Full Code Here

Examples of de.anomic.search.Switchboard.adminAuthenticated()

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        final Switchboard sb = (Switchboard) env;
        final serverObjects prop = new serverObjects();

        final String eventID = post.get("eventID", "");
        final boolean authenticated = sb.adminAuthenticated(header) >= 2;
        final int item = post.getInt("item", -1);
        final boolean auth = (header.get(HeaderFramework.CONNECTION_PROP_CLIENTIP, "")).equals("localhost") || sb.verifyAuthentication(header, true);
        final String path = header.get(HeaderFramework.CONNECTION_PROP_PATH);
        final boolean isHtml = path.endsWith(".html");
        final boolean isJson = path.endsWith(".json");
View Full Code Here

Examples of net.yacy.search.Switchboard.adminAuthenticated()

        if (post == null || env == null) return prop;

        // return variable that accumulates replacements
        final Switchboard sb = (Switchboard) env;

        if (sb.adminAuthenticated(header) < 2 && !Protocol.authentifyRequest(post, env)) {
            return prop;
        }

        if (post.get("object", "").equals("host")) {
            prop.put("name","host");
View Full Code Here

Examples of net.yacy.search.Switchboard.adminAuthenticated()

                } else {
                    prop.put("in_domains", 0);
                    prop.put("in", 1);
                }
            }
        } else if (sb.adminAuthenticated(header) >= 2) {
            // show a complete list of link structure informations in case that the user is authenticated
            final boolean latest = ((post == null) ? false : post.containsKey("latest"));
            final Iterator<WebStructureGraph.StructureEntry> i = sb.webStructure.structureEntryIterator(latest);
            int c = 0;
            WebStructureGraph.StructureEntry sentry;
View Full Code Here

Examples of net.yacy.search.Switchboard.adminAuthenticated()

        // return variable that accumulates replacements
        final Switchboard sb = (Switchboard) env;
       
        final serverObjects prop = new serverObjects();
        if ((post == null) || (env == null)) return prop;
        final boolean authenticated = sb.adminAuthenticated(header) >= 2;
       
        Segment segment = null;
        if (post.containsKey("segment") && authenticated) {
            segment = sb.indexSegments.segment(post.get("segment"));
        } else {
View Full Code Here

Examples of net.yacy.search.Switchboard.adminAuthenticated()

        searchengines.put("oai.yacy.net", "http://oai.yacy.net/yacysearch.html?verify=true&resource=local&nav=all&display=2&meanCount=5&query=");
    }

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        final Switchboard sb = (Switchboard) env;
        final boolean authenticated = sb.adminAuthenticated(header) >= 2;
        final int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);
        final servletProperties prop = new servletProperties();

        prop.put("display", display);
View Full Code Here

Examples of net.yacy.search.Switchboard.adminAuthenticated()

        // execute commands
        if (post != null) {
           
            if ((post.containsKey("deletespecific")) && (tableID >= 0)) {
                if (sb.adminAuthenticated(header) < 2) {
                    prop.put("AUTHENTICATE", "admin log-in");
                    return prop; // this button needs authentication, force log-in
                }
                final Iterator<String> e = post.keySet().iterator();
                String check;
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.