Welcome Guest, Not a member yet? Register   Sign In
Where do you put shared actions between admin and other users?
#1

[eluser]jleequeen[/eluser]
Hello,

I've created an application that has been separated into two sections. I have a public accessible section and then an admin section. My question is where do you put controllers that need to be shared by both? If I have a comments controller for the public, should I also create one for the admin as well? My admin files are in a subfolder. Someone floated the idea that I forget about having a separate folder for admin stuff, that it should all be put in one directory and controlled by ACL. Is this what I should do? I really don't want to have to duplicate controllers if at all possible, but the public app and admin app are really pretty much two different beasts besides maybe 10 shared actions. Any ideas?

Thanks.
#2

[eluser]Colin Williams[/eluser]
I would just go for a single controller that does access checks when and where needed. I think you've already discovered the problem with splitting it up.




Theme © iAndrew 2016 - Forum software by © MyBB