summaryrefslogtreecommitdiff
path: root/Source/Kernel/UserManager/User.class.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/UserManager/User.class.h')
-rw-r--r--Source/Kernel/UserManager/User.class.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Kernel/UserManager/User.class.h b/Source/Kernel/UserManager/User.class.h
index 1ad55f4..ae02281 100644
--- a/Source/Kernel/UserManager/User.class.h
+++ b/Source/Kernel/UserManager/User.class.h
@@ -28,16 +28,19 @@ class User {
u32int getUid() { return m_uid; }
Group* getGroup() { return m_group; }
bool isInGroup(u32int gid) {
+ if (m_group->getGid() == gid) return true;
for (u32int i = 0; i < m_extraGroups.size(); i++)
if (m_extraGroups[i]->getGid() == gid) return true;
return false;
}
bool isInGroup(String name) {
+ if (m_group->getName() == name) return true;
for (u32int i = 0; i < m_extraGroups.size(); i++)
if (m_extraGroups[i]->getName() == name) return true;
return false;
}
bool isInGroup(Group* g) {
+ if (g == m_group) return true;
for (u32int i = 0; i < m_extraGroups.size(); i++)
if (m_extraGroups[i] == g) return true;
return false;