Changeset 5024 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
2003-07-25T04:57:48+12:00 (21 years ago)
Author:
sjboddie
Message:

Changed the authentication directives to more easier to use ones.
authenticate option replaces auth_collection and takes the same options. The
options public_documents and private_documents replace the allowallexcept
and denyallexcept ACLs. The allow_acls has been removed. The auth_group remains
the same.

Location:
trunk/gsdl/src/recpt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/comtypes.cpp

    r5017 r5024  
    7171  // various parts of the code.
    7272 
    73   auth_collection.clear();         // turned off by default, individual collection authentication
     73  authenticate.clear();         // turned off by default, individual collection authentication
    7474  auth_group.clear();              // turned off by default, authentication by groups method
    75   allow_acls= false;               // turned off by default, our ACL switch either on or off in collect.cfg
    76   allowallexcept.clear();          // turned off by default, our allow-all-except <grouplist>
    77   denyallexcept.clear();           // turned off by default, out deny-all-except <grouplist>
    78  
    79  
     75  public_documents.clear();          // turned off by default, allow access to these documents <list>
     76  private_documents.clear();           // turned off by default, disallow access to these documents <list>
     77   
    8078}
    8179
  • trunk/gsdl/src/recpt/comtypes.h

    r4974 r5024  
    103103   text_t         httpprefix;
    104104   text_t         receptionist;
    105    text_t         buildType;       // 'mg' or 'mgpp'
    106    text_t         auth_collection; // 'document' or 'collection'
    107    text_t         auth_group;      // 'mygroup' 'yourgroup'
    108    bool           allow_acls;      // to make sure that the user wants to use this ACL feature
    109    text_tmap      allowallexcept;  // the acl to allow stuff or deny things
    110    text_tmap      denyallexcept;   // the opposite of the one above
     105   text_t         buildType;           // 'mg' or 'mgpp'
     106   text_t         authenticate;      // 'document' or 'collection'
     107   text_t         auth_group;          // 'mygroup' 'yourgroup'
     108   text_tmap      public_documents;    // the acl to allow access to listed documents
     109   text_tmap      private_documents;   // the acl to disallow access to listed documents
    111110   text_tarray    searchTypes; // form, plain, empty if collection uses mg, or has no searching facility
    112111};
  • trunk/gsdl/src/recpt/documentaction.cpp

    r5019 r5024  
    178178           ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, args["c"], logout);
    179179           
    180            if(cinfo->auth_collection == "document" && cinfo->allow_acls)
     180           if(cinfo->authenticate == "document")
    181181          {
    182182             // both are either commented out or uncomment and are empty
    183              if (cinfo->allowallexcept.empty() && cinfo->denyallexcept.empty())
     183             if (cinfo->public_documents.empty() && cinfo->private_documents.empty())
    184184            {
    185185               //deny everything
     
    188188            }
    189189
    190              // both allowallexcept and denyallexcept are turned on !
    191              else if (!cinfo->allowallexcept.empty() && !cinfo->denyallexcept.empty())
     190             // both public_documents and private_documents are turned on !
     191             else if (!cinfo->public_documents.empty() && !cinfo->private_documents.empty())
    192192            {
    193193               //deny everything
     
    196196            }
    197197             
    198              // only allowallexcept is set, so ask to authenticate for that article/doc
    199              else if (cinfo->allowallexcept.find(docTop) != cinfo->allowallexcept.end() )
     198             // only public_documents is set, so ask to authenticate for that article/doc
     199             else if (cinfo->public_documents.find(docTop) != cinfo->public_documents.end() )
    200200            {
    201201               
     
    204204            }
    205205             
    206              // only denyallexcept is set, so ask to authenticate for that article/doc
    207              else if (cinfo->denyallexcept.find(docTop) == cinfo->denyallexcept.end() )
     206             // only private_documents is set, so ask to authenticate for that article/doc
     207             else if (cinfo->private_documents.find(docTop) == cinfo->private_documents.end() )
    208208            {
    209209               args["uan"] = "1";
  • trunk/gsdl/src/recpt/receptionist.cpp

    r5020 r5024  
    11201120     ColInfoResponse_t *cinfo = get_collectinfo_ptr (collectproto, arg_c, logout);
    11211121     
    1122      if(cinfo->auth_collection == "collection")
     1122     if(cinfo->authenticate == "collection")
    11231123        {
    11241124           args["uan"] = "1";
Note: See TracChangeset for help on using the changeset viewer.