Object Security

R

Rodolfo

Can I make that an object to destroy himself?

I want to put some code in the constructor of a class (call to my security
service). If it doesn't have the permissions I want to not let the object be
instantiaded.

TIA
 
D

Deiussum

Rodolfo said:
Can I make that an object to destroy himself?

I want to put some code in the constructor of a class (call to my security
service). If it doesn't have the permissions I want to not let the object be
instantiaded.

TIA

Throw an exception in the constructor if the permissions aren't met.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top