Check Permissions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi-

I have set up a security class for my DB using the security wizard.

I have a large list of users and groups with different permission levels.

What I want to do is be able to manipulate my switchboard according to someone's permissions.

For example, I would like for someone that has the permission to view the financial data to be able to click a button on the switchboard that links to the financial data form, however if they do not have the permissions I would like to throw a msgbox at them.

Basically what i am asking how would I write this pseudocode in VB:

If (currentuser does NOT have permissions to view THIS OBJECT) Then
msgbox("You do not have permission")
cancel action
End if


Thanks guys!
 
Access will do this, but at the object level.

You can't tell Access that a particular page of a switchboard is alloed for
some, but not others.

If you create your own switchboards by making forms with buttons, then you
could allow or not allow access to the particular forms.

In short, the swichboard does not have anything to do with security, it is
the actual object.

That being said, you could write the code you mention, but with the dynamic
nature of switchboards it would be very hard to construct the "if" statement
to know which "button" they were cliecking, since the buttons are dynamic.

Also, what if it changes? The whole point of creating groups and users was
to make the permissions easy to maintain and uniform. Now you will have to
also change vba code if permissions change. Yuck!

Personally, I don't use the built-in switchboard because of these types of
limitations.


Rick B



Hi-

I have set up a security class for my DB using the security wizard.

I have a large list of users and groups with different permission levels.

What I want to do is be able to manipulate my switchboard according to
someone's permissions.

For example, I would like for someone that has the permission to view the
financial data to be able to click a button on the switchboard that links to
the financial data form, however if they do not have the permissions I would
like to throw a msgbox at them.

Basically what i am asking how would I write this pseudocode in VB:

If (currentuser does NOT have permissions to view THIS OBJECT) Then
msgbox("You do not have permission")
cancel action
End if


Thanks guys!
 
Ahhhh. That might be a bit easier. I don't know how to do it, but I'm
certian someone who does will get back to you.

Rick B


Thanks Rick, but I beleive you are misunderstanding my question.

What I want to do is be able to do is reference the current user logged onto
the database. From there, I would like to check if they have been given
permission to access a specific form. If they are NOT allowed to access
this, I would like to give them a customized error message.
 
Anyone have any suggestions?

Rick B said:
Ahhhh. That might be a bit easier. I don't know how to do it, but I'm
certian someone who does will get back to you.

Rick B


Thanks Rick, but I beleive you are misunderstanding my question.

What I want to do is be able to do is reference the current user logged onto
the database. From there, I would like to check if they have been given
permission to access a specific form. If they are NOT allowed to access
this, I would like to give them a customized error message.
 
Back
Top