Options

Show User Form Access Based on Permissions

victor73victor73 Member Posts: 55
Hello Guys,

I have the following problem to solve, maybe some of view have handled this before in your NAV career:

I want to supply a report or excel sheet, in which given a role ID (for example let's call it ORDER) that has for example some type of access to tabledata 18, tabledata 27, etc.. the report will show that it has access to Sales&Marketing (Module)->Sales (Folder)->Customer (Form), in other words a sort of tree view of the menu-items that a role-permission has access to.

I know that I'm asking too much but if someone has any type of technical suggestions please don't hesitate in sharing your experiences and thoughts

Thank you
Regards

Comments

  • Options
    victor73victor73 Member Posts: 55
    Hello,

    have anyone got any suggestions about my problem?

    Thank you
  • Options
    DakkonDakkon Member Posts: 192
    It sounds like you want a report that basically displays all the menu items a given role would give a user access to. Creating such a thing would be extremely difficult to accomplish. I'm also unsure as to how useful such a thing is for security auditing purposes (given that the forms and reports a user can run is only part of what permissions allow).
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    victor73victor73 Member Posts: 55
    Hello Dakkon,

    that is exactly what I want and I know it is extremely difficult (and I agree with what you said) I was just wondering if anybody has ever faced such request or issue. In case, I would appreciate any type of suggestions on how to do it.

    Thanks
  • Options
    DakkonDakkon Member Posts: 192
    Nobody that I know of has tackled this particular task. I think you will find the amount of work involved prohibitive when compared to the payoff. The only way I can think of at the moment involves extensive coding (most likely outside of Navision). First you would have to export all the Menusuite objects in text so you could parse them and reconstruct the menu the same way Navision does. Then you would need to walk through the menu structure finding each form reference and for each of those, export the object text source of the form so you could parse out the sourcetable the form is based on. Then you would reference the table permissions for the role in question and see if the user has read access on that table, if so they can see the menu item. I'm guessing this undertaking could take you weeks if not months of of development. I hope one of the other folks here has a simpler solution, but this is the only way I know of to accomplish what you want.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    victor73victor73 Member Posts: 55
    Thank you for your response,
    this is what I exactly designed and explained to our Application team and as you said the estimated time can go from 2 to 4 weeks unless someone so kind comes out with (and shares) some already developed solution in the comunity. :?:
    Waiting for some other suggestion, thank you for your precious time.
  • Options
    DakkonDakkon Member Posts: 192
    Well if you are working with .Net, I wrote an open source library that would allow you to automate the exportation of text object files as well as check permission data. You can download it from here http://mibuso.com/dlinfo.asp?FileID=1275 or you can always get the latest from my repository http://code.edgerunner.org/dynamics-nav-client-interface-library. It still requires that you have a running client with a proper developer license, but it may save you some time. You're on your own when it comes to reconstructing the menu from the menusuite objects, that is another project on my list I haven't tackled yet.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    vaprogvaprog Member Posts: 1,125
    What about a GUI automation that walks the menu tree and documents available menu items.

    I have seen a Menusuit search utility that walked the menu tree on a running client (some optical artifacts of this process were visible) and then allowed you to search for and navigate to a found menu item. So, that's how I know that this sort of thing is possible.
  • Options
    victor73victor73 Member Posts: 55
    Hello Dakkon,

    thanks for your help, but based on what you have shared, that is, C/Side Integration Utilities v1.4, I understand that I have to develop some kind of automation using your .Net classes and once I have registered it as a dll, I can then use it in Navsion to export/import text objects and do permission check as well... or am I wrong?

    Concerning to "reconstructing the menu from the menusuite objects" I have something on mind and once I have done that I'll share with you. I think of making some kind of procedure that given the menusuite txt file I'll create a NAV table in which each record will contain all relevant fields that define a menu node, so that I have all the correct relationships between the nodes and in this way I have a more user-friendly way to work with menus.

    Just let me know about the first point

    Regards
  • Options
    DakkonDakkon Member Posts: 192
    Yes, if you wished to use my dll from within Navision, you would need to decorate the source with a COM interop wrapper and then compile your own build. You could also create your own automation library that in turn calls my library (obviously you can solve that multiple ways). After that you could reference the classes as automation objects inside Navision. As for the menusuite that sounds like a nice solution for handling it within Nav and thank you for volunteering to share.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    victor73victor73 Member Posts: 55
    Hello Dakkon
    is the dll to register on my local pc Org.Edgerunner.Dynamics.Nav.CSide.dll?
    I tried to do it by using regsvr32 and I received an error saying to check if this is a valid OCX/DLL file
    :?
    Thank you
  • Options
    DakkonDakkon Member Posts: 192
    Well that is the .Net dll. What I was saying is that to make it usable as COM, you will need to add a COM wrapper to the .Net code and recompile it. Either that or build your own COM library that is capable of in turn calling my .Net library. I may try to add a COM wrapper to my project this weekend if I have time, but no guarantees. The annoying part about the COM interop for .Net is that it creates a tlb file to use and tlb's can be a pain in the butt to register/un-register (You'll probably want to create an installer to install the library and do the registration of the type library if you go this route). Sorry I wish it was as easy as calling regsvr32 :wink:
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • Options
    victor73victor73 Member Posts: 55
    OK Dakkon, that's clearer now, thank you for that, If you come up with something whenever I'll appreciate that, but as soon as I get the new Visual Studio application I'll do the COM wrapping as you suggested and then I'll let you know and further (when it's finished) I'll share my entire solution to you.
    :D
    Thanks
Sign In or Register to comment.