aboutsummaryrefslogtreecommitdiff
path: root/src/User.cpp
diff options
context:
space:
mode:
authordec05eba <0xdec05eba@gmail.com>2018-04-28 10:44:11 +0200
committerdec05eba <0xdec05eba@gmail.com>2018-04-28 10:44:22 +0200
commit54d8ae4c335c21290dc41e5ba4701b3c19bba601 (patch)
treef381e10e071e1800e8e5ca69701fe25e58dbd837 /src/User.cpp
parent166e132873fccf62327d2190fe1d827d89a5db63 (diff)
Add decryption (and caching) of data, even when adding encryption key after data has been added
Diffstat (limited to 'src/User.cpp')
-rw-r--r--src/User.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/User.cpp b/src/User.cpp
index d157c74..58e350a 100644
--- a/src/User.cpp
+++ b/src/User.cpp
@@ -26,4 +26,14 @@ namespace odhtdb
group->addUser(this);
}
}
+
+ bool User::isAllowedToPerformAction(PermissionType action) const
+ {
+ for(Group *group : getGroups())
+ {
+ if(group->getPermission().getFlag(action))
+ return true;
+ }
+ return false;
+ }
}