summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Brooks2016-11-10 07:46:23 -0800
committerDaniel Brooks2016-11-10 07:46:23 -0800
commit2cae0fdb9e12b5a2e247c1f10017746d59c03721 (patch)
tree1e45d66270113294328c9153e0a6299e2e452335 /src
parent37ffa7d3d71189bab3b17bbf0fda4a8ed9dbe8a8 (diff)
add the new shardmasters to iabak
You might want to test Group.hasUser; I wasn't actually able to test it.
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Group.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Propellor/Property/Group.hs b/src/Propellor/Property/Group.hs
index 58e49a86..30a9c665 100644
--- a/src/Propellor/Property/Group.hs
+++ b/src/Propellor/Property/Group.hs
@@ -12,3 +12,6 @@ exists (Group group') mgid = check test (cmdProperty "addgroup" (args mgid))
test = not . elem group' . words <$> readProcess "cut" ["-d:", "-f1", groupFile]
args Nothing = [group']
args (Just gid) = ["--gid", show gid, group']
+
+hasUser :: Group -> User -> Property DebianLike
+hasUser (Group group') (User user) = hasGroup user group'