Minor cleanup
This commit is contained in:
parent
71cbd3eacd
commit
06d44a4292
@ -269,7 +269,7 @@ instance HasRoute UniWorX MenuItem where
|
|||||||
urlRoute MenuItem{..} = urlRoute menuItemRoute
|
urlRoute MenuItem{..} = urlRoute menuItemRoute
|
||||||
|
|
||||||
menuItemAccessCallback :: MenuItem -> Handler Bool
|
menuItemAccessCallback :: MenuItem -> Handler Bool
|
||||||
menuItemAccessCallback MenuItem{..} = (&&) <$> ((==) Authorized <$> authCheck) <*> menuItemAccessCallback'
|
menuItemAccessCallback MenuItem{..} = and2M ((==) Authorized <$> authCheck) menuItemAccessCallback'
|
||||||
where
|
where
|
||||||
authCheck = handleAny (\_ -> return . Unauthorized $ error "authCheck caught exception") $ isAuthorized (urlRoute menuItemRoute) False
|
authCheck = handleAny (\_ -> return . Unauthorized $ error "authCheck caught exception") $ isAuthorized (urlRoute menuItemRoute) False
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user