summaryrefslogtreecommitdiff
path: root/Foundation.hs
diff options
context:
space:
mode:
authorClint Adams <clint@softwarefreedom.org>2013-10-24 15:33:27 -0400
committerClint Adams <clint@softwarefreedom.org>2013-10-24 15:33:27 -0400
commit1725e252b7bd6bec9faecb0249961343bb27afb0 (patch)
treede5fe0610f2833b64fd88bb2ea40fd59129f2d27 /Foundation.hs
parent45ebe1ffb0d6e229bb06a7c8dad2aabdaaf33083 (diff)
vacation report, belated commit
Diffstat (limited to 'Foundation.hs')
-rw-r--r--Foundation.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Foundation.hs b/Foundation.hs
index 15034a1..171d414 100644
--- a/Foundation.hs
+++ b/Foundation.hs
@@ -126,6 +126,8 @@ instance Yesod App where
isAuthorized (CategoryR _) False = return Authorized
isAuthorized (EmploymentR e) True = isAdmin
isAuthorized (EmploymentR _) False = return Authorized
+ isAuthorized (VacationR u) True = isUser u -- this should be impossible
+ isAuthorized (VacationR u) False = isUserOrAdmin u
isAuthorized _ _ = return Authorized
isUser :: UserId -> GHandler s App AuthResult