Skip to content
This repository

Create YesodPermissions type class #236

Open
meteficha opened this Issue · 6 comments

3 participants

Felipe Lessa Greg Weber Michael Snoyman
Michael Snoyman
Owner

Should we try to tackle this in Yesod 1.1?

Michael Snoyman
Owner

@meteficha @gregwebs Do you think it's worth trying to make this change for 1.1? Do we have an idea of a good approach to use?

Greg Weber
Owner

The current suggestions are still lacking in flexibility. My ideal implementation lets you write code like the following and need very few recompiles.

whenM (can user Delete resource) (destroy resource)

Note that this is resource based, not route based. But a route based permission can be built on top of it.

A user has permissions in the database. A permission is a list of roles plus application specific data. The application specific data (plus application specific code) can help determine if there is permission for the type of resource based on the roles the user has.

Something to think about :) Something is probably better than nothing, and nothing is required for the release.

Michael Snoyman
Owner

Have there been any thoughts on how to proceed here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.