| 1190 | { } |
| 1191 | |
| 1192 | bool isRoleGranted(const string& name, const string* role, bool& granted) |
| 1193 | { |
| 1194 | if (!(name.hasData() && role)) |
| 1195 | { |
| 1196 | granted = false; |
| 1197 | return true; |
| 1198 | } |
| 1199 | |
| 1200 | string* r = get(name); |
| 1201 | if (!r) |
| 1202 | return false; |
| 1203 | |
| 1204 | string zRole; |
| 1205 | zRole += ROLESEP; |
| 1206 | zRole += *role; |
| 1207 | zRole += ROLESEP; |
| 1208 | |
| 1209 | MAP_DEBUG(fprintf(stderr, "isRoleGranted '%s' '%s'\n", r->c_str(), role->c_str())); |
| 1210 | |
| 1211 | granted = r->find(zRole) != string::npos; |
| 1212 | return true; |
| 1213 | } |
| 1214 | |
| 1215 | void populate(const string& name, const string* /*role*/, Mapping::DbHandle& iDb) |
| 1216 | { |
no test coverage detected