Commit 9d96604
committed
Log: libcrmcommon: Set config warnings and errors for acl_permission
An acl_permission element's ID is currently used only for logging. So we
can be permissive and allow this. It seems that our usual approach to
things that the schema doesn't allow is to continue processing them if
it's possible (for example, if it doesn't result in a broken reference).
So warn here.
For missing or invalid "kind" attribute, we have to ignore the element,
so set a config error.
It doesn't look as if we're very consistent about when we set warnings
vs. errors, so I'm just doing what feels like it makes the most sense.
We could just as well call all of these warnings or call all of these
errors.
Also, log the parent type and ID parenthetically for errors other than
missing ID. If we proceeded with unpacking an acl_permission element
without an ID, we want any further log messages to have some identifying
information about where or what the acl_permission element is. It
doesn't hurt to log this even if the acl_permission's ID is set.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>1 parent 0fc264b commit 9d96604
1 file changed
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
151 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
155 | 166 | | |
156 | 167 | | |
157 | | - | |
158 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
164 | | - | |
165 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
169 | | - | |
170 | | - | |
| 183 | + | |
| 184 | + | |
171 | 185 | | |
172 | 186 | | |
173 | 187 | | |
| |||
0 commit comments