Changeset 5179


Ignore:
Timestamp:
2003-08-19T10:34:04+12:00 (21 years ago)
Author:
sjboddie
Message:

Fixed a bug in the logic of the public_documents and private_documents
directives.

File:
1 edited

Legend:

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

    r5124 r5179  
    206206            }
    207207             
    208              // only public_documents is set, so ask to authenticate for that article/doc
    209              else if (cinfo->public_documents.find(docTop) != cinfo->public_documents.end() )
    210             {
    211                
    212                args["uan"] = "1";
    213                args["ug"] = cinfo->auth_group;
    214             }
     208             // if public_documents is set but this document isn't
     209             // listed in it we need to authenticate
     210             else if ((!cinfo->public_documents.empty()) &&
     211                  (cinfo->public_documents.find(docTop) == cinfo->public_documents.end()))
     212               {
     213             args["uan"] = "1";
     214             args["ug"] = cinfo->auth_group;
     215               }
    215216             
    216              // only private_documents is set, so ask to authenticate for that article/doc
    217              else if (cinfo->private_documents.find(docTop) == cinfo->private_documents.end() )
    218             {
    219                args["uan"] = "1";
    220                args["ug"] = cinfo->auth_group;
    221             }
     217             // if private_documents is set and this document is
     218             // listed in it we need to authenticate
     219             else if ((!cinfo->private_documents.empty()) &&
     220                  (cinfo->private_documents.find(docTop) != cinfo->private_documents.end()))
     221               {
     222             args["uan"] = "1";
     223             args["ug"] = cinfo->auth_group;
     224               }
    222225             
    223226          }
Note: See TracChangeset for help on using the changeset viewer.