{
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;
+ }
};
}
if (!(show_caps & cap->GetMask()))
continue;
+ if ((show_all) && (!cap->OnList(user)))
+ continue;
+
if (minus_prefix)
out.push_back('-');
out.append(cap->GetName()).push_back(' ');