Jump to content

eziogrieco

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. Hi guys, thanks for your responses, they was been very helpful! This is the way i founded to solve my needed: <script type="text/javascript" src="http://minaba.net/assets/scripts/Minaba.js"></script> <script type="text/javascript"> var users_list_registry = "[@authfield:users_list_registry^]"; var companies_list_registry = "[@authfield:companies_list_registry^]"; anagrafiche_val = "No", if (users_list_registry =='Yes' && companies_list_registry =='Yes') { anagrafiche_val = "Yes"; } var data = { anagrafiche: anagrafiche_val, }; Minaba.setInfo(data); </script> In this way i obtained to cross 2 params before pass a value. See you next time! Ezio
  2. HI MayMusic, thank you very much for the fast response. This is exactly the code i setted in the footer of the datapage to collect some paramters and use them in my html page: <script type="text/javascript" src="http://minaba.net/assets/scripts/Minaba.js"></script> <script type="text/javascript"> var data = { anagrafiche: "[@authfield:users_list_registry^]", bordero: "[@authfield:users_list_bordero^]", borderoPrevisionale: "[@authfield:users_list_forecast_bordero^]", magazzino: "[@authfield:users_list_warehouse^]", magazzinoPrevisionale: "[@authfield:users_list_forecast_warehouse^]", contabilita: "[@authfield:users_list_accounting^]", contabilitaPrevisionale: "[@authfield:users_list_forecast_accounting^]", report: "[@authfield:users_list_report_manager^]", reportPrevisionale: "[@authfield:users_list_forecast_report_manager^]", admin: "[@authfield:users_list_company_admin^]", }; Minaba.setInfo(data); </script> With this script i collect user permissions and pass them to an html to show or hide some menu areas. It works very good! Now i would like to cross user permissions with company permissions, to avoid user to access to some areas denied to his own company. For this reason i tought a code that run in this way: var data = { if ([@authfield:users_list_registry^]='Y' && [@authfield:companies_list_registry^]='Y') { anagrafiche: "Yes", } else { anagrafiche: "No", } }; And repeat the code for each menu section (bordero, borderoPrevisionale, etc). In this way if the area is allowed to the company and the user, html will show the area, else it will be denied. The point is that this code doesn't work! Any other idea? Thanks in advance Ezio
  3. Hi guys, i need a small help! I'm passing a var data to an html page trough this script: var data = { registry: "[@authfield:registry^]", }; [@authfield:registry^] is a checkbox field, so it returns YES/NO. Now i need a more complex code. I would like to set something that do it: if { ([@authfield:registry^]= Yes & [@authfield:record^]= Yes) registry= Yes} else { registry = No } May somebody help me to fix this code? Thanks in advance Ezio Grieco
×
×
  • Create New...