Wednesday, November 2, 2016

[WSO2 App Manager] How to Disable App Types

WSO2 App Manager facilitates creating, publishing, and managing Webapps, Sites, mobile applications.  By default, these three app types are enabled in WSO2 App Manager. Enabled app types has mentioned under <EnabledAssetTypeList> in <AppM_Home>/repository/conf/app-manager.xml
   
   <EnabledAssetTypeList>  
     <Type>webapp</Type>  
     <Type>mobileapp</Type>  
     <Type>site</Type>  
   </EnabledAssetTypeList>  
   

If you want to disable any app type from App Manager, you can easily do it. You just have to remove unwanted app types from above configuration and restart the server.

If you disable mobileapp from App Manager, Publisher shows as below.

Store will show like below.



If you want remove "Site" from App Manager, you have to do two additional steps. Because Webapps and Sites are using same creating and editing pages in Publisher.
You have not to allow users to create "Sites" from Publisher. For that, you have to remove the relevant div(as shown in below image) from Publisher UI.




Comment below code block of
<AppM_Home>/deployment/server/jaggeryapps/publisher/themes/appm/partialspublisher/themes/appm/partials/add-asset.hbs

   
   <div class = "form-group" type = 'hidden'>  
     <label class = "control-label col-sm-2">Treat as a Site: </label>  
     <div class = "col-sm-10 checkbox-div">  
       <input type = "checkbox" class = "treatAsASite_checkbox">  
      </div>  
   </div>  
   
   
Comment below code block of
<AppM_Home>/deployment/server/jaggeryapps/publisher/themes/appm/partialspublisher/themes/appm/partials/edit-asset.hbs

   
   <div class = "form-group" type = "hidden">  
     <label class = "control-label col-sm-2">Treat as a Site: </label>  
     <div class = "col-sm-10 checkbox-div">  
      <label>  
        <input type = "checkbox" class = "treatAsASite_checkbox"  
          value = "{{{snoop "fields(name=overview_treatAsASite).value" data}}}">  
       </label>  
     </div>  
   




No comments:

Post a Comment