Is there a way to get all app ids that the current user has?

Confluence User - 05 Feb, 2024

I need to retrieve the app IDs that the user has so I can use them to get the necessary processes of the app IDs on a later field. Is there a way to do this?

user;forms;java;selectbox;beanshell

3


05 Feb, 2024
confluenceUser
confluenceUser
    AppDefinitionDao appDefinitionDao = (AppDefinitionDao)AppUtil.getApplicationContext().getBean("appDefinitionDao");
    appDefinitionList = appDefinitionDao.findPublishedApps("name", Boolean.FALSE, null, null);
   
    for (Iterator i = appDefinitionList.iterator(); i.hasNext();) {
            
       AppDefinition appDef = i.next();
       //this will give you the app
    }
06 Feb, 2024
confluenceUser
confluenceUser

I would suggest creating a datalist to get all the APP IDs.
And then use datalist hashvariable ( #datalist.col.csv.ID.column# ) to get all the records. You can apply filter to the variable as well.
Please read here : Hash Variable#DatalistHashVariable

06 Feb, 2024
confluenceUser
1
confluenceUser

Thank you for the answers, I have figured it out. I realized it is much simpler than I thought. I can get the app list from the apps table itself in the database. 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print