From 81c3db20d4775a115f148ed64c5bc1e54c5a3b65 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sun, 2 Aug 2020 14:31:00 +0100 Subject: Allow managers to CRUD all account types (not just admins) Per the assignment's instructions. --- src/App.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/App.hs') diff --git a/src/App.hs b/src/App.hs index 6f52dabccc22..07203d143646 100644 --- a/src/App.hs +++ b/src/App.hs @@ -89,7 +89,7 @@ server config@T.Config{..} = createAccount (Nothing, T.Admin) -> throwError err401 { errBody = "Only admins can create Admin accounts" } (Just cookie, _) -> - adminsOnly cookie doCreateAccount + adminsAnd cookie (\T.Account{..} -> accountRole == T.Manager) doCreateAccount where doCreateAccount :: Handler NoContent doCreateAccount = do -- cgit 1.4.1