Controlling user access externally [message #22504] |
Sat, 05 February 2005 04:16 |
krbvroc1
Messages: 31 Registered: February 2005
Karma:
|
Member |
|
|
Hello, I'm trying to accomplish some things and I'm having a tough time.
I currently have a website, mailing list and local NNTP server. We use FUDforum to suck articles from the NNTP for those users who cannot/will not use a newsreader.
Here is our scenario. People who are not members within a database adminstered from our website cannot post. Thus there are 3 types of people.
1) Anonymous - these people get read-only access to everything
2) Unregistered - these people are present in our database but are either unconfirmed or have been disabled. These people get read-only access to everything.
3) Registered - these people are present in out database and get full read/port capability.
Implementing this policy has not been tough in my other areas.
For the website, we query the database. For the newsreader, I use authentication from a db4 file that the website updates. For the mailing list, I added a handler to the python code of mailman to query the database and use the 'moderation' flag and automatic rejection.
Trying to do this in Fudforum is a problem. Partly becuase I'm finding it tough to figure our the design/code. Partly because of the access model.
Several searches here said there was a FUD API. One response said that it supported add / remove users. I do not see that in either the latest stable or latest RC version. It all appears to be related messaging / online users.
I was able to create a standalone php program that creates a 'fud_user_reg' object, fills in some fields, and calls add_user(). I had to modify add_user() to pass it an optional flag. It is now add_user($password_is_md5=0). I need to pass a password that is already encrypyed. add_user expects plaintext. Perhaps you can add this minor change? This way only users in our website database are created and they have a common username/password.
I have no idea of how to implement the access policy. Basically I thought I could create a stand alone php function which our website would use to modify a users group membership. I cannot figure out what tables are involved and how they relate! Conceptually, shouldn't I be able to change a registered user to an 'anonymous level user'. From the admin-land it appears anonymous level is what I want. I don't use any levels other than the two defaults. I was looking at the fud26_groups and fud26_group_members tables but I cannot figure it out. So, if I want to move a user using SQL commands from resitered level to anonymous level, how can I do this?
Thanks
|
|
|