nannoc Posted March 27, 2018 Share Posted March 27, 2018 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 28, 2018 Share Posted March 28, 2018 Hi, Please explain again what you wanted Quote Link to comment Share on other sites More sharing options...
nannoc Posted March 28, 2018 Author Share Posted March 28, 2018 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 Quote Link to comment Share on other sites More sharing options...
mierlp Posted March 28, 2018 Share Posted March 28, 2018 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 Quote Link to comment Share on other sites More sharing options...
nannoc Posted March 28, 2018 Author Share Posted March 28, 2018 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 Quote Link to comment Share on other sites More sharing options...
Ruslan Posted March 29, 2018 Share Posted March 29, 2018 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 1 Quote Link to comment Share on other sites More sharing options...
mierlp Posted March 30, 2018 Share Posted March 30, 2018 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 Quote Link to comment Share on other sites More sharing options...
Ruslan Posted April 4, 2018 Share Posted April 4, 2018 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.