| 96 | } |
| 97 | |
| 98 | void WebReport::init(const char* tDir) { |
| 99 | // find any groups that have viewreport or admin, let them fly |
| 100 | if (findGroupsWithPerm(bz_perm_viewReports).size()) { |
| 101 | addPermToLevel(1, bz_perm_viewReports); |
| 102 | } |
| 103 | else { |
| 104 | addPermToLevel(1, "ADMIN"); |
| 105 | } |
| 106 | |
| 107 | loadDefaultTemplates(); |
| 108 | |
| 109 | templateSystem.addSearchPath(tDir); |
| 110 | |
| 111 | templateSystem.addKey("evenodd", this); |
| 112 | templateSystem.addKey("Report", this); |
| 113 | templateSystem.addLoop("Reports", this); |
| 114 | templateSystem.addIF("Valid", this); |
| 115 | |
| 116 | templateSystem.setPluginName("Web Report", getBaseURL().c_str()); |
| 117 | } |
| 118 | |
| 119 | void WebReport::keyCallback(std::string& data, const std::string& key) { |
| 120 | if (key == "evenodd") { |
no test coverage detected