CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Admin and User access problem

Print topic Send  topic

Author Message
Jim
Posted: 07/16/2002, 1:48 PM

Can anyone help with this issue please? I have a database that has many users (17 currently), some of which have GroupID users level access and one having GroupID administrator level access. What I need to do is allow those with user level access just edit the information they enter into the database, and that is working fine. Now what is not working is to get the administrator to have access to all records no matter who entered the data into the database.

What I would like to do is have a sql statement that would reflect this, something like IF username <>"" select * from (mytable) where groupid=1 and username=(their username) ELSE select * from (mytable).

Don't know if this makes sense to anyone, but I sure hope someone reads this that can help me out.

Thanks
Ken
Posted: 07/16/2002, 1:51 PM

How I got around this in the past with CC 2.0 I created an additional page with access to all records and put that page in a protected directory on the server/host. Only issues here is that your server/host must support protected directories. I would think that with CCS and security that comes with it there should be an easier way to accomplish your goal by setting the user groups.
Jim
Posted: 07/16/2002, 2:08 PM

I could very easily create two seperate projects, or create pages within this project to do what you have suggested, but I am trying not to do that. There has to be an easier work around than that. One huge issue is that I have 15 seperate tables, but only four of them need to have both user level and admin level acces, the other 11 have only admin level access. I would like to keep all the files together, and just have a sql statement somewhere that would check the username against the admin user and then allow all the records to be viewed if the administrator logs in.

I am working on a fix for this, but not sure where it is going just yet. I need to get something done tonight or tomorrow, or I will have to abandon the project in CodeCharge Studio and do it again in ASPMaker, which I really don't want to do. I believe ASPMaker will allow me to do this, but would rather use CodeCharge Studio.
Hidran
Posted: 07/18/2002, 3:28 AM

Hi,
You could create a grid which will only be editable and a record which could be updatable then according to groupId show one or the other using CCGetGroupID and form_name->show().

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.