CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 CCS Security Group Issue

Print topic Send  topic

Author Message
mois2011

Posts: 4
Posted: 02/15/2011, 11:10 AM

The CCS authentication builder seems to be very straightforward. However, I could not get it to work with security group. Here is my set up:

1. I created a Users table with UserName, UserPassword, and GroupID.
2. I created a record for me with GroupID = 2.
3. I created the following groups: 1 = general users, 2=billing officer, 3=manager, 4=physician.
4. I created a couple of pages with Restricted = Yes and Access Group = 3 or 4. On page security first.

These pages did ask me to login and I could logging in. The issue is it should block me (since my groupID = 2 is less than these pages). But both allow me to access page and do whatever I need.

Am I missing something?

Thanks!

Jack
_________________
Enjoying every level of application development, coding, testing, documentation, deployment, integration, and finally a turn-key system.
View profile  Send private message
datadoit
Posted: 02/15/2011, 1:25 PM

Republish the entire project (F9). Log out, clear your cache, close all
browsers. Try again.
damian

Posts: 838
Posted: 02/15/2011, 6:56 PM

also you should also have some sort of UserID value in your user table - there are four required fields: ID, Group, Username, Password (i guess it is possible to use one field for more than one of these value but its probably not really useful).

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
mois2011

Posts: 4
Posted: 02/18/2011, 10:26 AM

Thanks guys!

I have checked my data table, which includes userID field as the PK. Also, I have done the F9 many times and even terminate CodeCharge to refresh sessions or cookies. Since it is not working, I am studying Login page (I did not create authentication from authentication builder) but just created a page and login page. The c# code for the login page only checks the user name and password, as far as I can tell, and it Redirect to the page once the validation is OK. I did not see any code where security group is checking. Appreciate your comment. I know I am missing something.

Jack
_________________
Enjoying every level of application development, coding, testing, documentation, deployment, integration, and finally a turn-key system.
View profile  Send private message
andrewi

Posts: 162
Posted: 02/19/2011, 2:59 AM

Interesting - I've found the login and group authentication to be quite solid in codecharge - at least in asp and php.

The group-membership checking is done on each page on which you have set page or form security levels. So you'll find the group checking functions in the secured-page's code, not the login page/form. The Login page doesn't know what group membership the page wants, so it just authenticates a user and gets their UserID. Then it redirects you back to the original page and that page checks whether you're in the right group or not.

But I'm surprised that this isn't working, as it's normally the easiest thing to set up. In the example in the first post I would expect this sequence (assuming starting from newly opened browser)
- try to go to PageWithSecurity4.aspx
- you are redirected automatically to login.aspx
- login as user with security 2
- you seem to login OK, but you are redirected back again to login.aspx

Something you could try is creating one of the sample solutions (on the solutions tab of File-New Project). They don't take long to build, and come with sample data. They almost always have security with a variety of levels. They should work - and then you can study the differences. If they don't work, it might be a question for support.
View profile  Send private message
damian

Posts: 838
Posted: 02/19/2011, 3:07 PM

do the pages allow you access without login?
try echoing CCGroupID() and CCUserID() and checking you are logged in as you think you are?

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message

Add new topic Subscribe to topic   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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