Ignore:
Timestamp:
2013-04-11T12:43:36+12:00 (11 years ago)
Author:
kjdon
Message:

For diego: when doing cross collection searching, now it takes into account authentication directives for the collections in the list. If a user has authenticated to get into the top collection, then his user groups are checked against the groups for all the collections. If he matches any, then they will be searched. But if he is not a member of the right group they will not be searched. If there was no authentication needed to get into top colleciton, then any collections with collection-level authentication will not be searched.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/queryaction.h

    r23378 r27172  
    3030#include "gsdlconf.h"
    3131#include "basequeryaction.h"
     32#include "userdb.h"
    3233#include "receptionist.h"
    3334
     
    4142  int num_phrases;
    4243
     44  userdbclass *user_database; // for checking user groups in ccs
    4345  virtual text_t query_filter_name () {return "QueryFilter";}
    4446
     
    9193  virtual bool save_search_history(cgiargsclass &args, int numdocs,
    9294                   isapprox isApprox);
    93 
     95  bool user_groups_match(const text_t &collection_groups, const text_t &user_groups);
     96  void validate_ccs_collection_list(cgiargsclass &args, recptprotolistclass *protos, ostream &logout);
    9497public:
    9598  queryaction ();
     
    99102  bool init (ostream &logout);
    100103 
     104  void set_userdb(userdbclass *udb) {user_database = udb;}
    101105  virtual text_t get_action_name () {return "q";}
    102106 
    103107  virtual bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
    104108                  recptprotolistclass *protos, ostream &logout);
    105 
    106109  virtual void define_internal_macros (displayclass &disp, cgiargsclass &args,
    107110                   recptprotolistclass *protos, ostream &logout);
Note: See TracChangeset for help on using the changeset viewer.