Click here to Skip to main content
15,887,350 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to publish Visual Basic 2010 (connected to Access 2007 DB) project? Pin
Dave Kreskowiak12-Jun-14 1:50
mveDave Kreskowiak12-Jun-14 1:50 
AnswerRe: How to publish Visual Basic 2010 (connected to Access 2007 DB) project? Pin
Bernhard Hiller11-Jun-14 20:50
Bernhard Hiller11-Jun-14 20:50 
GeneralRe: How to publish Visual Basic 2010 (connected to Access 2007 DB) project? Pin
Nguyen Tuan Anh11-Jun-14 20:54
Nguyen Tuan Anh11-Jun-14 20:54 
QuestionNgen fail with a protected .net exe file Pin
dilkonika9-Jun-14 5:36
dilkonika9-Jun-14 5:36 
SuggestionRe: Ngen fail with a protected .net exe file Pin
Richard Deeming9-Jun-14 6:03
mveRichard Deeming9-Jun-14 6:03 
GeneralRe: Ngen fail with a protected .net exe file Pin
dilkonika9-Jun-14 6:07
dilkonika9-Jun-14 6:07 
GeneralRe: Ngen fail with a protected .net exe file Pin
Richard Deeming9-Jun-14 6:12
mveRichard Deeming9-Jun-14 6:12 
QuestionDisable/Hide menu items based on user's right? Pin
savedlema9-Jun-14 3:35
savedlema9-Jun-14 3:35 
Quote:
Hi everyone!

I'm making an application which requires users with different permissions/previleges to login and use the application.For example, if the user is "admin", all menu items in the menu bar are shown and enabled. If the user is say "user_group1", some of the menu items are to be hidden. The same for "user_group2", "user_group3", "user_group4" and so on.

I could put a code for each specific user in each form but that's a great deal since users and their user groups may be added after application deployment. So it has to be something flexible.

I want the user "Administrator" to be able to assign/change permissions to others users of the system.

How do I do this?
I have been thinking of creating a table that will include user_groups and permisions, say like a row: user_group (user_group1, user_group2,user_group3) and permission (File,Edit,Backup,Manage Users (these being menu items)) and then for each user I will be setting either "Yes" or "No" under each permission/menu item indicating that the menu item is to be hidden of shown.
But, I can read these permission to a dataset but I can't see how to link them with the menu items.

How should I accomplish this please?

What I have done so far:

I had to come up with 5 tables just for this, as a result, I can run an SQL query that will bring a user and the menu items which he/she is supposed to see. I have attached an image showing the results of such a query. Now I need to take what is in the table and effect it by enabling only the shown menu items ('permissionName' in my table). How can I? Since I have them in a dataset, is it possible to do some loop to accomplish that?

Sorry, it seems I can't upload an img in codeproject.com

AnswerRe: Disable/Hide menu items based on user's right? Pin
Eddy Vluggen9-Jun-14 4:24
professionalEddy Vluggen9-Jun-14 4:24 
GeneralRe: Disable/Hide menu items based on user's right? Pin
savedlema9-Jun-14 9:12
savedlema9-Jun-14 9:12 
GeneralRe: Disable/Hide menu items based on user's right? Pin
Eddy Vluggen10-Jun-14 5:26
professionalEddy Vluggen10-Jun-14 5:26 
QuestionProblems running the application on another computer Pin
dilkonika8-Jun-14 5:52
dilkonika8-Jun-14 5:52 
AnswerRe: Problems running the application on another computer Pin
Richard MacCutchan8-Jun-14 6:38
mveRichard MacCutchan8-Jun-14 6:38 
GeneralRe: Problems running the application on another computer Pin
dilkonika8-Jun-14 8:52
dilkonika8-Jun-14 8:52 
GeneralRe: Problems running the application on another computer Pin
dilkonika8-Jun-14 10:47
dilkonika8-Jun-14 10:47 
GeneralRe: Problems running the application on another computer Pin
Richard MacCutchan8-Jun-14 21:49
mveRichard MacCutchan8-Jun-14 21:49 
QuestionCopy Table from Word then Paste to Excel VB.net Pin
_XeLo_5-Jun-14 23:29
_XeLo_5-Jun-14 23:29 
AnswerRe: Copy Table from Word then Paste to Excel VB.net Pin
Chris Quinn6-Jun-14 0:22
Chris Quinn6-Jun-14 0:22 
GeneralRe: Copy Table from Word then Paste to Excel VB.net Pin
_XeLo_6-Jun-14 14:40
_XeLo_6-Jun-14 14:40 
Questioncopy to next available row Pin
David Rubin4-Jun-14 5:10
David Rubin4-Jun-14 5:10 
QuestionNeed Help to connect to MQ 7.0 using user id getting 2035 error. Pin
Member 102184182-Jun-14 21:03
Member 102184182-Jun-14 21:03 
QuestionUsing Functions across forms Pin
gwittlock1-Jun-14 16:34
gwittlock1-Jun-14 16:34 
AnswerRe: Using Functions across forms Pin
Peter Leow1-Jun-14 17:12
professionalPeter Leow1-Jun-14 17:12 
GeneralRe: Using Functions across forms Pin
gwittlock1-Jun-14 18:14
gwittlock1-Jun-14 18:14 
AnswerRe: Using Functions across forms Pin
Bernhard Hiller2-Jun-14 0:23
Bernhard Hiller2-Jun-14 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.