Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restriction on number of users 4

Status
Not open for further replies.

brianpercival

Programmer
Jun 13, 2005
63
US
The subject line is ambiguous, I apologize, didn't know how to put it better.

I have a coldfusion application, say a very simple one, where users can login. The application will be hosted on the client machine as wellas the database. Meaning once sold we have no control over it.

As part of the sale, for what the client bought, we need to restrict him from adding more than five users. (The secure section of the application allows the admin to add users. The client admin can never add more than 5 users). How do I incorporate somesort of check like this that the client can not by pass?? Any pointers?

regards,
Brian
 
I'm assuming if the client can get into the code they can change anything they want eventually, or atleast get someone to do it for them.

With that said to me it seems like a simple query or if statement around the button or navigational element that allows them to add a new user.

Surround that button with a query that checks the adminusers tables, something lke:

Select ID, FirstName FROM adminusers

Then for your if statement surronding the button do a check for:

Code:
<cfif queryname.RecordCount GTE "5">
Don't show the button
<cfelse>
show the button
</cfif>

Or atleast something like that. Maybe there is a better way, im sure the guys will have more to add. Depending on the database maybe there is a way to do it in the database itself instead of in the code.

----------------------------------------
Florida Web Design
Orlando Web Hosting
Florida Coldfusion Hosting
 
As pointed out, if its in the code/database then the client will be able to change it - you may be able to look at using the encrpy utility to encrypt source code, the cfecrypt and decrypt functions have historically not been that secure (do a google to see all the free decrypting tools available :( ) but CFMX7 beefs it up a little

 
...and then you could go to court! If a client has hired you to write them an application, once you finish it and hand it over to them it's theirs. If they want to mass market it and sell it for a million dollars, they can. If they want to open it up and rewrite every query, they can. They can do whatever they want to with it, whether you like it or not. Any attempts to prevent or sabotage this could be considered illegal on your part. thread656-1083618

Now, if this is a program that you've written yourself and are mass marketing and selling it, that's a COMPLETELY different story!

But, to answer your question, coldfused is right, just run a check to see how many users are currently in the database and the have the page respond accordingly.


Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
thanks guys,

Actually the whole thing is built by us and we are selling as max 5 users. for more than 5 users it would be a different rate, etc... anyway, there has to be may be a java object based licensing solution or something like that. No clue as of now yet. As we know, there is no absolute way to hide stuff, but assuming there is a coldfusion developer on the other side, our intention is to make it as difficult to them as possible to add more users,tweaking with the code.

regards,
Brian
 
cf7 has sourceless deployment and stuff like that. you should check it out.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top