erichexter / twitter.bootstrap.mvc

nuget package to make bootstrap easy with mvc4
Apache License 2.0
248 stars 134 forks source link

Added support for roles in navigation routes #14

Closed ilivewithian closed 11 years ago

ilivewithian commented 11 years ago

I've added support to the Navigation routes for option user roles. If a roles is specified and the user is not in the role, the link will not render.

erichexter commented 11 years ago

I like where your going with this.. I think I will need to add a unit test project to start getting tests around this code. before we start extending it more.

ilivewithian commented 11 years ago

Yes, I completely agree. It felt odd sending a pull request without tests.

erichexter commented 11 years ago

I am adding project, unit test project.. and a solution now.once i push it we can get this concept into the codebase

erichexter commented 11 years ago

I just pushed the NavigationRoutes project and unit tests. we can start adding role based features to this now.

ilivewithian commented 11 years ago

I just pulled the latest version, but I can't see the sln or unit tests. Am I just missing something really obvious?

erichexter commented 11 years ago

it is kind of buried in the codebase.. https://github.com/erichexter/twitter.bootstrap.mvc/tree/master/src/NavigationRoutes

I think going forward.. once we get the apis worked out.. we will want to move navigation routes into a separate code repository.. it is already a separate nuget package.

Eric Hexter

blog | http://Hex.LosTechies.com info | http://www.linkedin.com/in/erichexter

On Sat, Nov 24, 2012 at 3:27 AM, Rob White notifications@github.com wrote:

I just pulled the latest version, but I can't see the sln or unit tests. Am I just missing something really obvious?

— Reply to this email directly or view it on GitHubhttps://github.com/erichexter/twitter.bootstrap.mvc/pull/14#issuecomment-10675727.

serra commented 11 years ago

Instead of specifying the role in the navigation route, would it be possible to use the authorization metadata from the target action or controller?

erichexter commented 11 years ago

Im on the same page with you.. I implemented a filter collection, that allows you to register filters that can remove a route for building the menu for the current request. That will enable, removing routes by their Authorization attributes. Remove based on authenticated state, think, login,logout, my account scenarios.. ect.

Eric Hexter

blog | http://Hex.LosTechies.com info | http://www.linkedin.com/in/erichexter

On Sun, Nov 25, 2012 at 5:25 AM, Marijn van der Zee < notifications@github.com> wrote:

Instead of specifying the role in the navigation route, would it be possible to use the authorization metadata from the target action or controller?

— Reply to this email directly or view it on GitHubhttps://github.com/erichexter/twitter.bootstrap.mvc/pull/14#issuecomment-10692452.