on 01-06-2006 10:47 AM
Hello,
I've created an add-on and it adds several user menu using an XML file.
My problem is that some of the menu should not be added because the user does not have permission.
How can I make that the menu added are only the menu the user can open ?
Whith Business One, a user without permission starts with altmost no menu.
Also when I make modification on the main form using form setting, and I want the user menu not to be visible, the information is not saved, and then when I open again Business One, the user menu are still there
Please help me.
Hello Patrick,
If you add menus using XML it is not possible to to any permission checking. If you and permission checking while the menu is added, you should add it in code or remove the menu afterwards.
I have never tested the second part of your question.
Regards,
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another aproach could be:
If the forms shown when the menus are clicked are user forms, set the authorization in the form level (As SAP does). And this way, when you set the configuration to "Apply authorization" only the allowed menus should appear.
Have a look at John Mackin´s presentation in the San Francisco TechSummit, for an example.
Hope helps,
Ibai Peñ
Thank you, but I have no link beween the menu, and the authorization (maybe that's why SAP doesn't give the functionalities)
so it's difficult to create the dynamic string.
Maybe I can have it by adding a usertable, that gives the link be authorization and the menu, but I was hoping that SAP do it.
Thank you
Message was edited by: Patrick Rolland
Hi Patrick,
With the trick I explain you don´t need any of the stuff you say. The only requeriment is that the forms are user forms, not standard B1 forms.
Have a look <a href="https://websmp205.sap-ag.de/~form/sapnet?_FRAME=OBJECT&_HIER_KEY=701100035871000454604&_SCENARIO=011">here</a> at the file named 120805_BestPractices_Danober-c.pdf where it is explained. It will worth, I think
Regards,
Ibai Peñ
Thank you Ibai for the link, it was very interesting.
But if I'm right, in the presentation, John speaks about the permission on the form, how to set them using the form type.
But it's not about the menu. The menu remain present even if the form type (permission) is set to "No authorization" . I think this is due to the fact that you have no link between the menuUID, and the permissionUID in Business One.
To open a form, you first catch the MenuEvent, so the add-on create the link between a menuUID, and a form. Then the application check the form type.
Thank you
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.