This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Multiple Admins
#1

I'd like to outline my current plans for this feature and hopefully get some feedback and suggestions. I got the impression from the corresponding feature request thread that people want this feature to be very simple. These are my current plans:

I'm going to create a new database table called 'administrators' which is going to have the following columns:
id
username
password
email_address
is_super
is_enabled
dated

The upgrade to v1.2 will move the administrator's username, password and email address from the 'settings' table into the new 'administrators' table and they will be the super admin.

All administrators will be able to go to Settings -> Administrator in the admin panel and can see and edit their own username, password and email address. When saving, a check will be performed to make sure that the username is unique.

If the super admin is logged in and viewing the Settings -> Administrator page then they will see a link on the page such as 'Manage Administrators'. Normal administrators will not see this link and they will not be able to view the page if they try to visit it.

The 'manage administrators' page will allow for admins to be created, edited and deleted. There can only be one super admin so the is_super database column can not be edited in the admin panel. The super admin can also disable any normal admin account.

At the moment I think that only the super admin should be able to view the 'Admin Detection' page. This makes the development of the feature a lot easier, otherwise the 'administrators' table would not only need an ip_address column but also all the columns needed for the admin defaults such as website address, country etc.

All admins will receive admin emails such as 'new ban' and 'new comment'. Whether to receive a particular admin email or not will be global. For example if an admin deselects to receive the 'new ban' email in Settings -> Email then no admins will receive it.

Have you completed the interview?
Reply
#2

Not bad, but I think that admin detection should have multiple admin support. Admins don't get a special comment box for nothing. Some of the tables can be combined into one, separated with semicolons, and extracted with regex, so that you have to create less tables. Try experimenting with that. It might bloat up the DB tables, but it's good for functionality. What do you think?

I'm giving you three guesses...
Reply
#3

Okay, all admins can be detected.

I may as well allow individual email settings too.

You'll have to explain your idea about combining database tables. I don't see any advantages. If it's not related then please start a new thread for this.

Have you completed the interview?
Reply
#4

This feature is now 50% complete. It's slightly more involved than I originally thought.

Have you completed the interview?
Reply
#5

Need help with any of it?

I'm giving you three guesses...
Reply
#6

I don't think so, thanks.

I've done the hardest part already which was the admin detection on the frontend. It was quite complex because the script has to try to detect the administrator, then check whether they actually wanted to be detected, and also whether their desired detection method detects them or not.

The email part is done. When there is a new comment or new ban, the script emails all administrators who want to receive the email type being sent and who are enabled.

The admin panel login is done. It allows any valid administrator to log in.

Now I'm going to re-code the Settings -> Administrator and Settings -> Admin Detection pages and then allow for the management of administrators so that they can be added, edited and deleted etc.

The good thing about the feature is that every single setting on the Settings -> Admin Detection page will be specific to each administrator account. Each admin can choose whether they want to be detected and how. Also each admin can enter their own default form values.

Have you completed the interview?
Reply
#7

This feature is now 90% complete. Nearly done.

Have you completed the interview?
Reply
#8

That's great news. What is there left to complete?

I'm giving you three guesses...
Reply
#9

Just a few checks like making sure that the username is unique and that the super admin is not being deleted.

Then I need to write the upgrade code for moving the admin data from the settings table.

Then lots of testing.

Have you completed the interview?
Reply
#10

I'm really looking forward to releasing v1.2.

I think it will take Commentics to another level.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Static
14-Jan-2011, 05:29 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)