[Odns-devel] user-management patch
Brought to you by:
swix
|
From: Ferdinand K. <fk...@ay...> - 2001-07-01 00:53:40
|
Hi,
A few moths ago, i was searching for a webinterface for bind.
So a had a look on oDNS (version 0.3.3a), and i thought it was an good and easy to
install tool which filled my needs.
The only thing i missed, was an user-management.
So i changed the code a little bit, and added an user-management.
I sent the changed code to Olive Mueller and Jakob Perz.
Oliver told me to send my changes to this list.... ok, my fault ;)
No i want to do so (no time until yet.. :-( ).
I made two classes of users:
normal users
admins
The only difference is, that only admins are allowed to manage users
(change/add/delete). To make this difference i set an flag in the
odns_users table in the row "syscomments".
If the user is an admin, "admin" is written to that field, if not
its empty.
Files changed/added:
index.php:
Changes: added a db-query if the user is an admin.
If so, an link to admin.php is shown.
admin.php:
Manage-Users form.
Here, the admin can select the user to change/delete
or he can create an new user.
odns_user_form.php:
The user-form itself.
Here the user-data is entered.
odns_sql_stuff.php:
Changes: added delete_user_entries() function.
Installation Note:
* install the patch with:
patch -p0 < patch.odns-0.3.3a-1
* add an admin user to your "odns_users" table (like an normal user, but
writting "admin" in the "syscomments" field).
Example:
insert into odns_users (login_name,passwd,syscomments) values ('test',password('test'),'admin');
This will create an admin-account with username "test" and password "test".
If you want to have a quick and dirty look at it, go to:
http://www.ayn.at/odns/
and login with user "test" password "test".
You will have admin-rights, so please do not delete the user "test"!!
The patch is availiable under http://www.ayn.at/odns/patches/
Hope my work is usefull for somebody.
Regards,
Ferdinand Karner
|