uniform XML boolean attribute access
Replace 'attribute(...).has_value("yes")`
with 'attribute_value(..., false)'.
This allows for boolean configuration to be set with values such as
"true", "false", "yes", "no", or "1", "0".
Fixes #2002
This commit is contained in:
committed by
Christian Helmuth
parent
51e8f05fb6
commit
8ae2f65da8
@@ -410,9 +410,7 @@ class File_system::Root : public Root_component<Session_component>
|
||||
/*
|
||||
* Determine if write access is permitted for the session.
|
||||
*/
|
||||
try {
|
||||
writeable = policy.attribute("writeable").has_value("yes");
|
||||
} catch (Xml_node::Nonexistent_attribute) { }
|
||||
writeable = policy.attribute_value("writeable", false);
|
||||
|
||||
} catch (Session_policy::No_policy_defined) {
|
||||
PERR("Invalid session request, no matching policy");
|
||||
|
||||
Reference in New Issue
Block a user