overriding the Workbook Unprotect-function

P

Puil

I'm writing a VSTO-project for excel. The workbook has hidden tabs and fields
and is protected with a password. But I would like to enforce a stricter
security-policy: users should only be allowed to unprotect the sheet if they
are part of a specific group. If they're not in the group, they cannot
unprotect, even if they know the password.
I tried to find an event that fires when the user unprotects the sheet, but
no event I can hook into exists. I tried to override the unprotect-method,
but it seems impossible.
Is there any way I can add my security-implementation to the already present
built-in security ?
 
S

ShaneDevenshire

Hi,

Let's put this in prespective - you don't want john to get into your house
but you give him the key? So you add a second lock to the house, but you
give him that key also? So you require that he provide the secret password,
but you give him that password?

How are you going to check what group they belong to? If you prompt them
for that, they can always lie.

You could have your IT people restrict access to the file location for a
given set of users. But someone may know the login of a member of the group,
so that really doesn't work.

Why would you give the password to people who aren't supposed to have it?
Someone else is giving it out to unauthorized individuals, then maybe they
should be terminated.

You could add a retinal scan to determine if the person is who they say they
are. There is software out their to do that. Or a fingerprint reader, I
have one on my machine.
 
P

Puil

Shane,

Prompting people to check in what group they belong to would, indeed, be
very stupid. The system to check who they are, and to what "group" they
belong to is irrelevant to the question. We have written a system that works
well. (Why would you ask someone what group he belongs to? That can be
derived from their credentials which can be examined through managed code)
What we want to avoid is to have user John providing his password to user
Jack. If Jack tries to unprotect the sheet with the password, he still
shouldn't have access.

To put this into perspective: I didn't give my key to John. John managed to
make a copy of my key (or he got a copy from my wife). But I still want to
keep him out of my house.
 

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