This topic is locked

Addign admin user

8/22/2007 8:51:07 AM
PHPRunner General questions
S
Samadhi author

Ok,
So i create a basic system where i can add a PIN, password, name, address etc for users.

I compile the system and test it. The system allows me to add users, view, edit etc.
BUT i need a login screen.
So i go back and edit my project to create a login screen and get teh system to read teh PIN and password to get access through my login. I need an admin user so i click the "add admin user" option and select a user ID fo rteh PIN that corresponds to teh admin user.
I compile the system and test it. It lets me log in as an admin user but when i click to add a new user for some reason in the PIN field it has already written there the admin users pin. I delete this and try type a new PIN to add a user and it gives me a "Duplicate entry '7777' for key 1". It does not give this error without teh login screen.
So thiking laterally i decide go back into my project and edit it. I unclick the "add admin user" option in the advanced security setting and instead decide to use user group permissions. I create a group called "admin" which has access to everything, and i use the default permissions setting for everyone else.
I create a new entry in the database that specifies the "admin" level for one user. I login as the admin user, and try to add a new user and again it says the "duplicate entry for key 1" message.
I shoudl mention my PIN is my primary key. Could this have somethign to do with it?
Any ideas whats happenign here.
Why woudl the system let me add users normally....but when i put in a login screen and admin user it gives this error.

J
Jane 8/22/2007

Hi,
it seems that you use PIN as OwnerID on the Advanced security settings dialog.

I recommend you to do the following:

  1. create custom view of this table on the Datasource tables tab
  2. select User can see and edit others users data option for this view on the Advanced security settings dialog on the Security tab
  3. check off this view for the admin account only on the Define use group permissions dialog on the Security tab.