Changeset 5024
- Timestamp:
- 2003-07-25T04:57:48+12:00 (21 years ago)
- Location:
- trunk/gsdl/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/collectserver.cpp
r4974 r5024 101 101 102 102 // What have we set in our collect.cfg file : document or collection ? 103 else if (key == "auth _collection") collectinfo.auth_collection= value;103 else if (key == "authenticate") collectinfo.authenticate = value; 104 104 105 105 // What have we set for our group list … … 115 115 116 116 joinchar(cfgline,',',collectinfo.auth_group); 117 // outconvertclass t; 117 118 //outconvertclass t; 118 119 //cerr << t << collectinfo.auth_group << "\n"; 119 120 } 120 121 121 // Have we set our security switch for use of acl to ON ?122 123 else if (key == "allow_acls")124 {125 if(value=="true")126 collectinfo.allow_acls = true;127 else128 collectinfo.allow_acls = false;129 }130 131 122 // In the map the key-value pair contain the same 132 // data 133 134 // What have we set for our allowallexceptACL135 else if (key == " allowallexcept")123 // data i.e key == data, if key is 2 then data is 2 124 125 // What have we set for our public_documents ACL 126 else if (key == "public_documents") 136 127 { 137 128 text_tarray::const_iterator begin = cfgline.begin(); … … 139 130 while(begin != end) 140 131 { 141 collectinfo.allowallexcept[*begin] = *begin; 132 // key = data i.e if key is 2 then data is 2 133 // collectinfo.public_documents[*begin] is the key 134 // *begin is the data value 135 136 collectinfo.public_documents[*begin] = *begin; 142 137 begin++; 143 138 } 144 139 } 145 140 146 // What have we set for our group list147 else if (key == " denyallexcept")141 // What have we set for our private_documents ACL 142 else if (key == "private_documents") 148 143 { 149 144 text_tarray::const_iterator begin = cfgline.begin(); … … 151 146 while(begin != end) 152 147 { 153 collectinfo.denyallexcept[*begin] = *begin; 148 // key = data i.e if key is 2 then data is 2 149 // collectinfo.public_documents[*begin] is the key 150 // *begin is the data value 151 152 collectinfo.private_documents[*begin] = *begin; 154 153 begin++; 155 154 } -
trunk/gsdl/src/recpt/comtypes.cpp
r5017 r5024 71 71 // various parts of the code. 72 72 73 auth _collection.clear(); // turned off by default, individual collection authentication73 authenticate.clear(); // turned off by default, individual collection authentication 74 74 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 80 78 } 81 79 -
trunk/gsdl/src/recpt/comtypes.h
r4974 r5024 103 103 text_t httpprefix; 104 104 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 111 110 text_tarray searchTypes; // form, plain, empty if collection uses mg, or has no searching facility 112 111 }; -
trunk/gsdl/src/recpt/documentaction.cpp
r5019 r5024 178 178 ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, args["c"], logout); 179 179 180 if(cinfo->auth _collection == "document" && cinfo->allow_acls)180 if(cinfo->authenticate == "document") 181 181 { 182 182 // 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()) 184 184 { 185 185 //deny everything … … 188 188 } 189 189 190 // both allowallexcept and denyallexceptare 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()) 192 192 { 193 193 //deny everything … … 196 196 } 197 197 198 // only allowallexceptis set, so ask to authenticate for that article/doc199 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() ) 200 200 { 201 201 … … 204 204 } 205 205 206 // only denyallexceptis set, so ask to authenticate for that article/doc207 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() ) 208 208 { 209 209 args["uan"] = "1"; -
trunk/gsdl/src/recpt/receptionist.cpp
r5020 r5024 1120 1120 ColInfoResponse_t *cinfo = get_collectinfo_ptr (collectproto, arg_c, logout); 1121 1121 1122 if(cinfo->auth _collection== "collection")1122 if(cinfo->authenticate == "collection") 1123 1123 { 1124 1124 args["uan"] = "1";
Note:
See TracChangeset
for help on using the changeset viewer.