diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-02T13·31+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-02T13·31+0100 |
commit | 81c3db20d4775a115f148ed64c5bc1e54c5a3b65 (patch) | |
tree | bd6e4be14aa5e63d321d6106b68f6df0e0e6d4ca /src/App.hs | |
parent | 803db7a5b2f1b8fadda45efce56d6c31a74a1e08 (diff) |
Allow managers to CRUD all account types (not just admins)
Per the assignment's instructions.
Diffstat (limited to 'src/App.hs')
-rw-r--r-- | src/App.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |