newattitude
Posts: 18
|
| Posted: 04/02/2005, 7:51 AM |
|
I know how to put security on a page so users login - but here is my question. I need to get a bit more sophisticated. In the past I create asp for a specific user with a query that will show them there data they login and have their data. NOW I need to have ALL users use the SAME page and have the security DRIVE what they see I intend to use a security column in the table to identify which 'group' has access to a given item and then when they login they will only see 'their' data they have rights to. Not sure how to implement this. Thank you in advance.
_________________
More Later,
Susan Justice |
 |
 |
Oper
Posts: 1195
|
| Posted: 04/03/2005, 11:30 AM |
|
So you will show the data that belong to the user on the right side (in a grid)
* First you need to record on each data that belong to that user the userid (ccgetuserid() )
* second on the grid you will filter userd UserdIDField = ccgetuserid (Expr)
* on the Form you will Filter for DataIDField and UseridFiled
That way only there data will show on the grid and they only coudl update/change there personal data.
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
newattitude
Posts: 18
|
| Posted: 04/03/2005, 6:26 PM |
|
Thank you for the reply - Ok will I have to do this as an event for the (ccgetuserid()) or do I go to the body of the code etc.?
Also - stupid question - let's say I have 5 lines of data that are shared by 'multiple' users can I accomplish this by giving the lines a 'group' number of say 2 and all the users that have access will have a group number of 2 then use getgroupid ??? Thank you for your patience with my stupid questions.
_________________
More Later,
Susan Justice |
 |
 |
newattitude
Posts: 18
|
| Posted: 04/03/2005, 6:29 PM |
|
Oh I am sorry - If I can't do it using a group to accomodate multiple users having access what is my alternative? Thank you.
_________________
More Later,
Susan Justice |
 |
 |
peterr
Posts: 5971
|
| Posted: 04/03/2005, 10:26 PM |
|
Usually you wouldn't need to use ccgetuserid function but the GroupID session variable in the WHERE part of your SQL query - usually created automatically by CCS when you create so-called "Where parameter".
This is the most standard and natural way to filter records - the SQL.
Sample tutorial for this is at: http://docs.codecharge.com/studio/html/QuickStart/Creat...archParams.html
though your parameter would look like: group_id = GroupID (Session)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
newattitude
Posts: 18
|
| Posted: 04/04/2005, 10:26 PM |
|
Ok - I apologize for having to ask so many questions
Example
UserID Group
1 3
1 5
1 7
2 9
3 29
and so on - each row in the table to be pulled has the 'group' identified in a 'user_group' column - I have a master table with each user listed and then a one to many relationship to a security table where the user has multiple lines listing the groups they have access to
Now when I build my 'grid' I am unsure what I have to add to have it evaluate the users 'login' against the 'groups' they have access to. I apologize if I am not asking this clearly but I REALLY need help this is due in the MORNING and I am at it all night if necessary!!! Thanks.
.
_________________
More Later,
Susan Justice |
 |
 |
peterr
Posts: 5971
|
| Posted: 04/04/2005, 11:09 PM |
|
See: http://forums.codecharge.com/posts.php?post_id=58143 http://forums.codecharge.com/posts.php?post_id=56991 http://forums.codecharge.com/posts.php?post_id=43087 http://forums.codecharge.com/posts.php?post_id=48499
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
newattitude
Posts: 18
|
| Posted: 04/05/2005, 12:47 PM |
|
OK More info I have everything working and I can easily manually change my criterea on my ms access query which shows only that users records - BUT I want to have the criterea determined by the users login
when they login I want their user id passed automatically to the criterea of my MS Access query HELP
_________________
More Later,
Susan Justice |
 |
 |
peterr
Posts: 5971
|
| Posted: 04/05/2005, 12:56 PM |
|
Here you go: http://forums.codecharge.com/search.php?s_keyword=UserI...m[]=6&s_period=
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |