Jump to content

Clone UniMainMenu


Recommended Posts

Could anyone please assist me in cloning a UniMainMenu.

 

I want to clone my MainMenu to use it in a setup procedure to give/deny users of my app access to menu functions. The cloned menu will have check options for each menu item that I will check/uncheck and store in database.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Hi,

 

Please explain again what you wanted

Hi, thank you for responding.

 

As part of granting user access to my app, I want to grant/deny access to certain menu items. The way I want to do this, is to clone (copy) the current mainmenu into a mainmenu component that I can use in my user setup dialog. This new mainmenu component will have an exact copy of my mainmenu I use in my app and each item will be checkable. In my setup, I will then check each item the specific user will have access to. This information will then be stored for each user and applied to the app’s mainmenu when the user logs in.

 

If you have a better suggestion, I would appreciate it if you could share.

 

Thank you

Donald

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Create a table with you're users and all the menu items or options in you program.
Every menu item or button or option is a field in this table.

This field can be set true/false. After login you do something like :

 

MainMenu.MenuBank.Enabled := datamodule.table.fieldbyname('Bank').value

Link to comment
Share on other sites

Create a table with you're users and all the menu items or options in you program.

Every menu item or button or option is a field in this table.

This field can be set true/false. After login you do something like :

 

MainMenu.MenuBank.Enabled := datamodule.table.fieldbyname('Bank').value

Got it, thank you.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Create a table with you're users and all the menu items or options in you program.

Every menu item or button or option is a field in this table.

This field can be set true/false. After login you do something like :

 

MainMenu.MenuBank.Enabled := datamodule.table.fieldbyname('Bank').value

 

but user can enable this item in source code of the page, after that it will working

  • Upvote 1
Link to comment
Share on other sites

Don't understand what you mean ?

 

I created a separted form which only can access by the administrator for entering

new users or edit access. This 'USERS 'table contains usersname, password, fullname, e-mail etc.

including fields for the properties you want them to have acces to.

 

Let's say you have a table and form called Country. This tables will be used in a other

form as lookup and where the user can select a country. Normally you fill this table Country

once and ready. There's 1 user who has to maintain this tabel Country.

 

You create a field in the USERS table called 'access_country' with the value True or False

I create a form called USERS for add, editing the users and to grant acces (use a checkbox to set

the value for access_country tre or false.

 

that's all

Link to comment
Share on other sites

Don't understand what you mean ?

 

I created a separted form which only can access by the administrator for entering

new users or edit access. This 'USERS 'table contains usersname, password, fullname, e-mail etc.

including fields for the properties you want them to have acces to.

 

Let's say you have a table and form called Country. This tables will be used in a other

form as lookup and where the user can select a country. Normally you fill this table Country

once and ready. There's 1 user who has to maintain this tabel Country.

 

You create a field in the USERS table called 'access_country' with the value True or False

I create a form called USERS for add, editing the users and to grant acces (use a checkbox to set

the value for access_country tre or false.

 

that's all

 

I mean that when you do "MainMenu.MenuBank.Enabled := datamodule.table.fieldbyname('Bank').value" unigui "disable" this item using CSS and user can modify CSS in browser and get access to this menu item. You need additionally check access on server side but not only disable menu

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...