Welcome Guest, Not a member yet? Register   Sign In
How do you handle administration functions/interface?
#1

[eluser]jleequeen[/eluser]
Hi Everyone,

I was wondering how anyone handles the administrative portions of their apps using CI. Especially if some of your models and libraries could be shared between the front-end (public) and back-end (admin) apps. Is it worth some redundancy to create two separate applications for each? Any ideas or suggestions would be great.
#2

[eluser]Jamie Rumbelow[/eluser]
I generally don't bother with creating different apps - I find it easier to just create an "admin" folder in my controllers.

But that's just me...
#3

[eluser]Dam1an[/eluser]
I also just put all the admins tuff in a seperate directory, just makes life easier.
Although in general (not sure if its an issue with frameworks though, as they use the index.php as a front controller, and don't allow direct access) its poor security to name the admin folder 'admin' as this is the first thing a potential hacker will look for
#4

[eluser]jleequeen[/eluser]
@Jemgames

Do you use URI Routing to make URL's shorter?

@Dam1an

Do you have separate models for your admin/public functions?

@Anyone

My application basically has 3 types of user. I have a public user that can see the site and doesn't have a login. The other two types of users need a login. One is someone who registers for the site, and the other is a administrative user who manages the site. I'm basically trying to decide which way to go. Either create basically three separate apps, although I like the idea of organizing my controllers into sub-directories for each type of user...but then I also have some controllers/views that need to be shared between the registered user and administrative user. It seems that duplicating the controllers for each type of user would be redundant in that scenario.
#5

[eluser]Jamie Rumbelow[/eluser]
I don't use url routing, I usually find that when you remove the index.php from the URL, its not a problem, after all:

http://yourserver.com/admin/users/new

Isn't a problem!
#6

[eluser]Mirage[/eluser]
[quote author="jleequeen" date="1211327757"]My application basically has 3 types of user. I have a public user that can see the site and doesn't have a login. The other two types of users need a login. One is someone who registers for the site, and the other is a administrative user who manages the site. I'm basically trying to decide which way to go. Either create basically three separate apps, although I like the idea of organizing my controllers into sub-directories for each type of user...but then I also have some controllers/views that need to be shared between the registered user and administrative user. It seems that duplicating the controllers for each type of user would be redundant in that scenario.[/quote]

jleequeen,

Take it from a different angle. Implement an ACL system, which divides users by role. Control access to a an admin controller or given methods of an admin controller by checking the login and the ACL. Control output of the admin interface base on privileges defined in the ACL. The rudimentary implementation of this approach I just wrote about in this thread.

There's really no need to separate the function the model performs by module unless your application grows really - and I mean really - big.

HTH,
Juergen




Theme © iAndrew 2016 - Forum software by © MyBB