Bunyas
|
Posted: 04/29/2004, 6:44 AM |
|
For some groups of users, i need to give them access to their own data - but not other peoples.
For example, i may want to allow users to update their own membership details - i may or may not want them to be able to view other members details but i definitely wouldn't want them to be able to edit other members details.
If i want them to be able to only view/edit their own records or view all records in the table, but only edit their own, ...
How can i do?
|
|
|
peterr
Posts: 5971
|
Posted: 04/29/2004, 12:08 PM |
|
You can use the "UserID" session variable to filter records and show only those record(s) that match the current user.
You would need to open the "Data Source" property of your grid or record and then create a parameter like shown at http://docs.codecharge.com/studio/html/UserGuide/Forms/RecordForm.html and http://docs.codecharge.com/studio/html/UserGuide/Forms/ug314.png
but instead of "user_id" you would need to enter "UserID" and select Type=Session.
The "UserID" is a standard session variable created by the program when someone logs in.
You can also see this implemented in our Portal example, for example go to http://examples.codecharge.com/Portal/ , Sign In, then click "Account" to view your details. The Portal uses a different session variable (PortalUserID), which is specified in Project -> Settings -> Security -> Advanced.
For more advanced user-based security refer to the tutorials. For example for ASP: http://docs.codecharge.com/studio/html/QuickStart/EnhAp...rInitEvent.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|