CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 restricting certain functions in a record form to a certain user?..

Print topic Send  topic

Author Message
YxorPitna
Posted: 03/09/2004, 2:21 PM

hi everyone..

i converted to CCS recently from CodeCharge, after believing that i've mastered and reached codecharge's limits..
hoping CCS would open up many limitless ways to tackle my requirments, i found myself rather stuck in an IDE which is anything but similar to CodeCharge!
maybe it's just me, anyway, here goes:

i have a record form that's used to add/update/delete data,
is it possible to disable add and delete functions for certain users? i want the form to completely hide the add/delete buttons from a form, and deny loading the page or processing the final SQL statement in add/delete mode for some users incase someone attempted to manually feed the action variables and actually got somewhere with it, in an attempt to bypass that measure..

i'm doing this in PHP, but pseudo code will do..

once this question is answered, i'll be able to fo sort out another issue i have in mind..:

the same form has a password and a password confirmation field..
i'd like it if the form doesn't load those two field values from the database, so that they'd appear blank when the form is loaded in update mode.. ( that way, the current password isn't visible on the form, or in the page source )..
problem with that is. if a user updates some information and skips the passwords, CCS will then update the table with all the fields including the blank password :\
how can i override this?
perhaps, add a constraint that checks, and only updates the password if it's not blank, otherwise leave the table field alone.

please bare with me, for i'm a CCS n00b :)
many thanks in advance..
peterr


Posts: 5971
Posted: 03/09/2004, 11:46 PM

Hi,
Regarding the record security, a similar scenario is described in our Quick Start Tutorials:
http://docs.codecharge.com/studio/html/QuickStart/EnhAp...rInitEvent.html

Regading the passwords, I believe that you can use the Before Show event to clear the password fields. See:
http://docs.codecharge.com/studio/html/ProgrammingTechn...ntrolValue.html
But during the update, you may want to use the Before Update event with the code similar to this one:
http://docs.codecharge.com/studio/html/ProgrammingTechn...foreInsert.html
Though in your case if the password field is blank then you might need to use CCLookup to retrieve the existing password value and assign it to the password field. This might not be a cleanest solution and would require an extra database query, but I can't think of anything else at the moment. CCDLookup is described here:
http://docs.codecharge.com/studio/html/Components/Funct.../CCDLookUp.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
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.