]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (C) 1996-2025 The Squid Software Foundation and contributors | |
3 | * | |
4 | * Squid software is distributed under GPLv2+ license and includes | |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
7 | */ | |
8 | ||
9 | #ifndef SQUID_SRC_ACL_USERDATA_H | |
10 | #define SQUID_SRC_ACL_USERDATA_H | |
11 | ||
12 | #include "acl/Acl.h" | |
13 | #include "acl/Data.h" | |
14 | #include "sbuf/SBuf.h" | |
15 | ||
16 | #include <set> | |
17 | ||
18 | class ACLUserData : public ACLData<char const *> | |
19 | { | |
20 | MEMPROXY_CLASS(ACLUserData); | |
21 | ||
22 | public: | |
23 | ~ACLUserData() override {} | |
24 | ACLUserData(); | |
25 | bool match(char const *user) override; | |
26 | SBufList dump() const override; | |
27 | void parse() override; | |
28 | bool empty() const override; | |
29 | ||
30 | private: | |
31 | /// whether parse() is called in a case insensitive context | |
32 | static Acl::BooleanOptionValue CaseInsensitive_; | |
33 | ||
34 | /* ACLData API */ | |
35 | const Acl::Options &lineOptions() override; | |
36 | ||
37 | typedef std::set<SBuf,bool(*)(const SBuf&, const SBuf&)> UserDataNames_t; | |
38 | UserDataNames_t userDataNames; | |
39 | ||
40 | struct { | |
41 | bool case_insensitive; | |
42 | bool required; | |
43 | } flags; | |
44 | ||
45 | }; | |
46 | ||
47 | #endif /* SQUID_SRC_ACL_USERDATA_H */ | |
48 |