
27 Aug
2012
27 Aug
'12
1:15 p.m.
On Mon, Aug 27, 2012 at 5:52 AM, Arthur Clemens
Did something change in Yesod? This part doesn't seem to work:
isAuthorized route isWrite = do mauth <- maybeAuth runDB $ mauth `isAuthorizedTo` permissionsRequiredFor route isWrite
Returns
Foundation.hs:109:20: Couldn't match expected type `(UserId, User)' with actual type `Entity val0'
To fix this bug you'll need to change all '(UserId, User)'s into 'Entity User's. For example: hasPermissionTo :: Entity User -> Permission -> YesodDB sub Blog AuthResult (Entity _ user) `hasPermissionTo` Post = ... etc. I'm not sure if there's anything else missing. Cheers, =) -- Felipe.