3 Replies Latest reply on Jul 19, 2016 6:24 AM by laurent.ducamp@ext.adeo.com

    Show app action or not with ext props

    laurent.ducamp@ext.adeo.com

      Hi all,

       

      We are trying to developp an new app. But we want the apps is displayed only on specific space (like the githubforjive apps)

       

      I have added exts props on the target space, and put the filter=exists on the path , but it doesn't work ?

       

      Could you help me  ?

       

      with curl, I have added ext props on the space :

       

      First I get a token :

       

      curl -u "xxxxxxxxxxxx.i:xxxxxxxxxxxxxx.s" -d "grant_type=password&username=MyLogin&password=MyPwd"  https://uat-younity.groupeadeo.com/oauth2/token

      {"access_token":"yyyyyyyyyyyyyyyyyyyyyyyy.t","refresh_token":zzzzzzzzzzzzzzzzzzzzzz.r","token_type":"bearer","expires_in":"172799"}

       

      After, I add new props to the space :

       

      My place is self url of place is https://uat-younity.groupeadeo.com/api/core/v3/places/450417/extprops

      curl -k -H 'Authorization: Bearer yyyyyyyyyyyyyyyyyyyyyyyy.t' -H 'Content-Type:application/json' -d '{"github4jiveEnabled":true,"isjobspace":"true"}' https://uat-younity.groupeadeo.com/api/core/v3/places/450417/extprops

      ...

      Jive responds:

      {

       

        "github4jiveEnabled" : "true",

        "isjobspace" : "true"

      }

       

       

      I put on my app.xml the following path   path="jive/actions/places/space?filter=exists(context.extprops.isjobspace)

       

      The file :

      <Require feature="actions">  
      
         
       <Param name="action-contributions">  
      
         
      
       <![CDATA[
      
         
      
      
       <action id="com.jivesoftware.places"
      
         
      
      
      
      
       path="jive/actions/places/space?filter=exists(context.extprops.isjobspace)" 
         
      
      
      
      
       label="Exists Place action (simpleapp)"
         
      
      
      
      
       view="canvas"
         
      
      
       />
      
      
      
          
      <action id="com.jivesoftware.docs"
         
      
      
      
      
       path="jive/actions/content/document?filter=equals(context.extprops.isjobspace,false)" 
         
      
      
      
      
       label="Equals Place action (simpleapp)"
         
      
      
      
      
       view="canvas"
         
      
      
       />
      
      
          
      <action id="com.jivesoftware.addon.github4jive.space.newIssue.exists"
                            
      path="jive/actions/places/space?filter=exists(context.extprops.github4jiveEnabled)"
                            
      label="Create New GitHub Issue exists"
                            
      view="canvas"
                            
      icon="images/icon16.png" />
      
      
          
      <action id="com.jivesoftware.addon.github4jive.space.newIssue.equals"
                            
      path="jive/actions/places/space?filter=equals(context.extprops.github4jiveEnabled,false)"
                            
      label="Create New GitHub Issue equals"
                            
      view="canvas"
                            
      icon="images/icon16.png" />
      
      
         
      
      
       <action id="com.jivesoftware.profile.rtc" 
         
      
      
      
      
       path="jive/actions/profile" 
         
      
      
      
      
       label="Example Profile Pop-Up" 
         
      
      
      
      
       url="https://developer.jivesoftware.com" 
         
      
      
      
      
       icon="images/icon16.png"
         
      
      
      
      
       windowSpec="left=40,top=40,width=500,height=500,toolbar=1,resizable=0"/> 
         
      
       ]]>  
         
       </Param>  
      
          </Require>
      

       

       

       

      But, app doesn't take care my filter. It always display action !!!

       

      In the target space, it's ok !!   :

       

       

      The following space was not targetted , and my custom ext props doesn't exist on  this space !!! 

       

      Hi GitHub4Jive/app.xml at master · jivesoftware/GitHub4Jive · GitHub contributors , I think it's easy for you Ryan Rutan, Aron Racho , Bertrand Quesada

       

      Thank you in advance