aboutsummaryrefslogtreecommitdiff
path: root/include/modules/cap.h
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-01-29 18:15:32 +0000
committerGravatar Sadie Powell2021-01-29 18:15:32 +0000
commitbb35650b5721e5d951f15060e4ecf474a8343ced (patch)
tree315cfbd8ac4cf02c1f6ce608aed8f9530f784a0d /include/modules/cap.h
parentAllow using fixedpart/fixedquit with an empty message. (diff)
parentRemove unnecessary chdirs in the helper script. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'include/modules/cap.h')
-rw-r--r--include/modules/cap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/modules/cap.h b/include/modules/cap.h
index 600876374..3af3f8082 100644
--- a/include/modules/cap.h
+++ b/include/modules/cap.h
@@ -303,6 +303,12 @@ namespace Cap
{
}
+ /** Retrieves the underlying cap. */
+ operator const Cap::Capability*() const
+ {
+ return ref ? *ref : NULL;
+ }
+
/** Check whether a user has the referenced capability turned on.
* @param user User to check
* @return True if the user is using the referenced capability, false otherwise