From 3e08629e8342cfbd17388aa14facf3a3a963233f Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 5 Dec 2015 15:42:04 +0100 Subject: m_cap Add Capability::OnList() hook --- include/modules/cap.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/modules') 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; + } }; } -- cgit v1.3.1-10-gc9f91