summaryrefslogtreecommitdiff
path: root/include/modules/cap.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-12-05 15:42:04 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-12-05 15:42:04 +0100
commit3e08629e8342cfbd17388aa14facf3a3a963233f (patch)
tree5e2ba8e5254777a4c3fd8a003689036152346f1e /include/modules/cap.h
parent53b9f55c18dd72e8495f84bacfe6683d8df81e66 (diff)
m_cap Add Capability::OnList() hook
Diffstat (limited to 'include/modules/cap.h')
-rw-r--r--include/modules/cap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/modules/cap.h b/include/modules/cap.h
index 4ca3911a5..a00089260 100644
--- a/include/modules/cap.h
+++ b/include/modules/cap.h
@@ -199,5 +199,15 @@ namespace Cap
{
return true;
}
+
+ /** Called when a user requests a list of all capabilities and this capability is about to be included in the list.
+ * The default behavior always includes the cap in the list.
+ * @param user User querying a list capabilities
+ * @return True to add this cap to the list sent to the user, false to not list it
+ */
+ virtual bool OnList(LocalUser* user)
+ {
+ return true;
+ }
};
}