From 2cae0fdb9e12b5a2e247c1f10017746d59c03721 Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Thu, 10 Nov 2016 07:46:23 -0800 Subject: add the new shardmasters to iabak You might want to test Group.hasUser; I wasn't actually able to test it. --- src/Propellor/Property/Group.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Propellor/Property/Group.hs') 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' -- cgit v1.2.3