Oct 05

The other day i was reading Mayank’s new blog Extreme Engineering Network. Especially his post about assigning menu suites automatically was pretty neat. Well it could be, as it basically just gave you the information on _how_ you could do it. Looking at a lot of hex-editor information, i decided to give it a spin!

Assigning Menu Suites to users is a painful job for any adminstrator, as you have to go into design of the menu suite, and then for each Menu you have to uncheck the box for users that should not have access. And setting up a new user, gives access to everything by default, so you have to go into each menu to unassign – lots of work!

Lets take the information to a POC – proof of concept. You can read all about the values in the blob field on Mayank’s blog, if you are interested in the details. But here is a quick video demonstration that shows you the POC i just did:

  1. First read the GUID and Description of the Menu’s in your current Menu Suites
  2. Assign Menus
  3. Update User Menu Level table

It generates a binary file something like this:

(C) Mayank - Extreme Engineers

Since it is a POC, the code is really not release standard yet. But it is pretty simple. The blob field is written using a OutStream, there are some static content in it, and some size placeholders. Then all the GUID’s for the menu’s and finally their settings. This just gets imported back into the “User Menu Level” and voila. The POC only shows for the current user, but it will be expanded to have a full user setup, and groups, so you can assign users to menu groups etc.

Any comments, suggestions for features – let me know. Not to forget kudos to Mayank for decoding the blob field :).

4 Responses to “Assigning Menu Suites permission Automatically – Implemented!”

  1. Mayank says:

    Hi Soren,
    Thanks for the appreciation. I am glad that you found it useful. I’ll be releasing my version of code to implement this concept for all users. What I am still looking for is a way to get the GUIDs for the Menus from within the system without having to export the Menusuite objects in text.
    If you do find something do share/post about it.
    By the way, I really love your posts (specially the c/al extractor) and am a regular follower.

  2. In the POC i used NAV2009, and used the EXPORTOBJECTS functionality to export as text, and then parse through the file to find the Menu GUID and Names. Also you could be using the functionality of the C/AL Extractor, but then you would be relying on a third party library.

    I will post the code for my “blob” generator tomorrow, as it is very simple.

  3. ALopez says:

    Does anybody know or have a routine to interpret the BLOB field in the User Menu Level table? Somehow this has to be tied to the Menu objects (GUID link?), it would be nice to get a report of what menus each user has access to. I have exported our menu suite object to text and can see the GUID # and description of the menu, however, I don’t know how to link this to what is in the BLOB of the above mentioned table. Thanks.

  4. RS says:

    How can i get this ??

Leave a Reply to Mayank

preload preload preload
pornpants.com pornofri.com kilporn.com