Examples of verifyAuthentication()


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

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        final Switchboard sb = (Switchboard) env;
        sb.localSearchLastAccess = System.currentTimeMillis();

        final boolean searchAllowed = sb.getConfigBool("publicSearchpage", true) || sb.verifyAuthentication(header, false);

        boolean authenticated = sb.adminAuthenticated(header) >= 2;
        if (!authenticated) {
            final UserDB.Entry user = sb.userDB.getUser(header);
            authenticated = (user != null && user.hasRight(UserDB.AccessRight.EXTENDED_SEARCH_RIGHT));
View Full Code Here

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

 
  public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
    final Switchboard sb = (Switchboard) env;
    prop = new serverObjects();       
        final UserDB.Entry user = sb.userDB.getUser(header);
        final boolean isAdmin = (sb.verifyAuthentication(header, true));
        final boolean isAuthUser = user!= null && user.hasRight(UserDB.AccessRight.BOOKMARK_RIGHT);

       
        if(isAdmin || isAuthUser) {
          final String bmk_user = (isAuthUser ? user.getUserName() : YMarkTables.USER_ADMIN);
View Full Code Here

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

            }

            // if a minus-button was hit, remove a special reference first
            if (post != null && post.containsKey("deleteref")) {
                try {
                    if (!sb.verifyAuthentication(header, true)) {
                        prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                        return prop;
                    }

                    // delete the index entry locally
View Full Code Here

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

                }
            }

            // if a plus-button was hit, create new voting message
            if (post != null && post.containsKey("recommendref")) {
                if (!sb.verifyAuthentication(header, true)) {
                    prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                    return prop;
                }
                final String recommendHash = post.get("recommendref", ""); // urlhash
                final URIMetadataRow urlentry = indexSegment.urlMetadata().load(UTF8.getBytes(recommendHash));
View Full Code Here

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

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {

        final Switchboard switchboard = (Switchboard) env;
        final serverObjects prop = new serverObjects();
        boolean isAdmin = false;
        isAdmin = switchboard.verifyAuthentication(header, true);
       
        prop.put("result", "0");//error
        //rename tags
        if(post != null && isAdmin) {
          if (post.containsKey("selectTag") && post.containsKey("addTag")) {
View Full Code Here

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

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
       
        final Switchboard switchboard = (Switchboard) env;           
        final serverObjects prop = new serverObjects();
        boolean isAdmin = false;
        isAdmin = switchboard.verifyAuthentication(header, true);
       
        prop.put("result", "0");//error
        //rename tags
        if(post != null && isAdmin && post.containsKey("old") && post.containsKey("new")){
            if(switchboard.bookmarksDB.renameTag(post.get("old"), post.get("new")))
View Full Code Here

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

  final static int SHOW_ALL = -1;
 
  public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        // return variable that accumulates replacements
        final Switchboard switchboard = (Switchboard) env;
        final boolean isAdmin = switchboard.verifyAuthentication(header, true);
        final serverObjects prop = new serverObjects();
        Iterator<BookmarksDB.Tag> it = null;
        String tagName = "";
        int top = SHOW_ALL;
        int comp = SORT_ALPHA;
View Full Code Here

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

            prop.put("forward_target", forwardTarget);
            return prop;
        }
       
        // access control
        final boolean authorizedAccess = sb.verifyAuthentication(header, false);
        if ((post != null) && (post.containsKey("publicPage"))) {
            if (!authorizedAccess) {
                prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                return prop;
            }
View Full Code Here

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

        final Switchboard sb = (Switchboard) env;
        final serverObjects prop = new serverObjects();
        Segment segment = null;
        boolean html = post != null && post.containsKey("html");
        prop.setLocalized(html);
        if (post != null && post.containsKey("segment") && sb.verifyAuthentication(header, false)) {
            segment = sb.indexSegments.segment(post.get("segment"));
        }
        if (segment == null) segment = sb.indexSegments.segment(Segments.Process.PUBLIC);
       
        prop.put("rejected", "0");
View Full Code Here

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

       
        final serverObjects prop = new serverObjects();
        final Segment segment;
        boolean html = post != null && post.containsKey("html");
        prop.setLocalized(html);
        boolean authorized = sb.verifyAuthentication(header, false);
        if (post != null && post.containsKey("segment") && authorized) {
            segment = sb.indexSegments.segment(post.get("segment"));
        } else {
            segment = sb.indexSegments.segment(Segments.Process.PUBLIC);
        }
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.