15-Aug-2010, 12:10 PM
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.
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.