diff options
Diffstat (limited to 'Foundation.hs')
-rw-r--r-- | Foundation.hs | 2 |
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 |