0

I've asked this before and I'm really racking my brains here.

To create an admin controller or simply have an if statement in the view.

view

if session == admin
    show admin delete post

This would minimize my code so much. I really can't see the wrongness in this. Although it may contravene true MVC patterns.

Edited by iamthwee

2
Contributors
1
Reply
16
Views
3 Years
Discussion Span
Last Post by pritaeas
0

Showing the delete post link is view dependent (so kind of acceptable), but don't forget to include the same check in your controller. The other option is to create two separate views, one for a user, one for an admin.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.