Skip to content

Commit ebbb160

Browse files
committed
Doc: libcrmcommon: Add Doxygen to ACL apply functions
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
1 parent 5871c41 commit ebbb160

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

lib/common/acl.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,18 @@ pcmk__unpack_acls(xmlDoc *source, xml_doc_private_t *target, const char *user)
606606
pcmk__xe_foreach_child(acls, NULL, unpack_acl_target_or_group, target);
607607
}
608608

609+
/*!
610+
* \internal
611+
* \brief Set an ACL's mode on a node that matches its XPath expression
612+
*
613+
* Given a node that matches an ACL's XPath expression, get the corresponding
614+
* XML element. Then set the ACL's mode flag in the private data of that
615+
* element. For details, see comment in the body below, as well as the doc
616+
* comment for \c pcmk__xpath_match_element().
617+
*
618+
* \param[in,out] match Node matched by the ACL's XPath expression
619+
* \param[in] user_data ACL object (<tt>xml_acl_t *</tt>)
620+
*/
609621
static void
610622
apply_acl_to_match(xmlNode *match, void *user_data)
611623
{
@@ -657,6 +669,15 @@ apply_acl_to_match(xmlNode *match, void *user_data)
657669
g_string_free(path, TRUE);
658670
}
659671

672+
/*!
673+
* \internal
674+
* \brief Apply an ACL to each matching node in an XML document
675+
*
676+
* See \c apply_acl_to_match() for details on applying the ACL.
677+
*
678+
* \param[in,out] data ACL object to apply (<tt>xml_acl_t *</tt>)
679+
* \param[in,out] user_data XML document to match against (<tt>xmlDoc *</tt>)
680+
*/
660681
static void
661682
apply_acl_to_doc(gpointer data, gpointer user_data)
662683
{
@@ -666,6 +687,18 @@ apply_acl_to_doc(gpointer data, gpointer user_data)
666687
pcmk__xpath_foreach_result(doc, acl->xpath, apply_acl_to_match, acl);
667688
}
668689

690+
/*!
691+
* \internal
692+
* \brief Apply all of an XML document's ACLs
693+
*
694+
* For each ACL in the document's \c acls list, search the document for nodes
695+
* that match the ACL's XPath expression. Then apply the ACL to each matching
696+
* node.
697+
*
698+
* See \c apply_acl_to_doc() and \c apply_acl_to_match() for details.
699+
*
700+
* \param[in,out] doc XML document
701+
*/
669702
void
670703
pcmk__apply_acls(xmlDoc *doc)
671704
{

0 commit comments

Comments
 (0)