2 Replies Latest reply on Sep 8, 2020 7:07 AM by Markus Wurzinger

    Custom Web Tab Permissions

    Markus Wurzinger Active Member

      Hello everybody,

       

      we currently developing some custom web tabs. Everythings works good and now we want to set some permissions to these new tabs.

       

      Our Tab extends "AbstractDetailTab< List< EntityProxy > >" and overrides the function "getDisplayPermissionId()" to return a permission-id-string.

      The function hasReadPermission() checks the entity-read permission on items and getGroup returns DisplayPermissions.Item.GROUP_ID.

       

      The tab is enabled via CustomModule which extends AbstractWebModule with the function getListDetailTabBinder( Components.DetailTabs.ARTICLE_LIST ).addBinding().to(...).

       

      Like i said, the tab is working correctly, but the permission is not shown in the "organization"-interface visibility-view in the rich-client. Other tabs, which we implemented via xml-coding in the article.detailtab.xml are shown in the interface visibility-view.

       

      is there a trick to get this working ? I have a feeling, that just one small thing is missing.

       

      Kind regards

      Markus

        • 1. Re: Custom Web Tab Permissions
          Jasmeet Kaur New Member

          Hi Markus,

           

          I haven't tried your approach but I have created custom permissions in past using a permission provider which extends PermissionProviderBaseImpl and it helped in adding the permission in organization view. May be this information be of some help to you.

           

          Thanks,
          Jasmeet

          • 2. Re: Custom Web Tab Permissions
            Markus Wurzinger Active Member

            Hey Jasmeet,

             

            thanks for your answer. I found the solution. Because i was developing a web-client tab i only contributed my plugin to the server-app. But to load the permissions, you need to contribute some things to the rich-client ... found it out after a lot of decompiling.

             

            So here is how i did it:

            1 package for permissions, which i contribute to the rich client and the server

            - here you have to add extensions to "com.heiler.ppm.std.core.displayElementContribution". Hint: have a look at "com.heiler.ppm.web.permission.core".

             

            1 package for web-tab and logic which requires package 1.

            Here is my logic and the tabs returning some static string from package 1 as ids.

             

            Maybe this can prevent others from search hours for this.

             

            Kind regards

            Markus