Solved

How do I hide a Switchboard item?

Posted on 2008-10-07
7
220 Views
Last Modified: 2012-05-05
Dear Experts,

I have a Switchboard menu that includes an item that is restricted to system administrators only.  Users login to the application but all see the same menu.  Currently, I require a password to access this particular menu obtion - but was wondering if there is any way to hide a switchboard item.

Thanks for your help,
Jeanne
0
Comment
Question by:aeolianje
  • 5
  • 2
7 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22659156
When a user logs in, is there anything that identifies that usert as an Administrator?  

Do you have a table of users, along with some representation of their password - best if it encrypted, and not plain-text?

AW
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22659205
I once had an application with precisely the conditions that you are describing - A set of 'Administrator Only' functions, accessed via the Switchboard - and visible only to Administrators, after they had 'logged in' via a User Login on the Switchboard..  But I had a Users table, which held the User login and encrypted password, along with the functional category of the user (ADMIN, GENERAL, CLERK for example) and could then control which features were exposed (made visible) based on user Category.

AW
0
 

Author Comment

by:aeolianje
ID: 22659497
AW,

Yes - I do have a user table.  It was origianlly set up so that we could restrict certain forms.  This will be the first time we use this function - but it will be to restrict Switchboard options.

I could simply display a message based upon the user category -- but was hoping to hide the Switchboard item altogether.  Is there something that I can do when assessing the 'handlebutton'?

Thanks,
Jeanne
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 250 total points
ID: 22660233
Once the user has successfully logged on, you make the various Buttons on the Switchboard Visible or Not based on the Category/Privilege of the user.

Either like this

If User.Category = "ADMIN" then
    cmdButton!.Visible = True
    cmdButton2.Visible = False
ElseIf User.Category = "GENERAL" Then
    cmdButton1.Visible = False
    cmdButton2.Visible = True
End If

or like this (your choice)

 Dim AdminVisible as Boolean
 Dim GeneralVisible as Boolean
 Dim ClerkVisible as Boolean

'only one of these can ever be true
AdminVisible = (User.Category = "ADMIN")
GeneralVisible = (User.Category = "GENERAL")
ClerkVisible = (User.Category = "CLERK")

cmdButton1.Visble = AdminVisible  'only visible to ADMIN
cmdButton2.Visble = GeneralVisible ' Only visible to General user
cmdButton3.Visble = AdminVisible OR GeneralVisible ' visible to BOTH ADMIN and GENERAL


AW
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22673348
I added a separate button, to allow the user to login, which was NOT part of the normal Switchboard - hence did not work with HandleButton.  All of the other controls/buttons on the SwitchBoard main menu were initially invisible.  Then, in the Button_Click event handler for the Login Button and based on the category of user, make the necessary buttons visible, and deal with the switchboard in the normal manner.

AW
0
 

Author Closing Comment

by:aeolianje
ID: 31504635
Thanks for your help!

This will work fine.  It does not show the Switchboard option.  It does leave a blank link but that should not be a problem for the user.

Thanks again,
Jeanne
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 22679557
GLad to be of assistance.

AW
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question