AnsweredAssumed Answered

SQL to filter by allowable actions

Question asked by mikerawlins on Jun 18, 2014
Latest reply on Jul 7, 2014 by jpotts
I am helping build Alfresco client support (via CMIS) into an existing Java application. In our Alfresco implementation we have a number of different sites - currently almost 100. At full implementation we may have considerably more. Our targeted user community will be segregated by project and a typical user will only have write access to a limited number of sites.

I want to retrieve a sorted list of sites that includes only the sites to which a user has write access (allowable actions CAN_CREATE_DOCUMENT,CAN_UPDATE_PROPERTIES, etc.). I have this currently working very nicely with the API via getDescendents on the Sites folder and related method calls.

The problem: performance sucks (is terrible, for those not familiar with English slang). It can take up to 30 seconds to return the filtered, sorted list of sites to the user. This will only get worse as we add more sites.

I have coded an alternate implementation that fetches only the relevant properties for the user UI using an SQL query. It returns a sorted list in 2 seconds. The only problem is that this list is not filtered by allowable actions.

Is there a way to query allowable actions using SQL?

I am happy to post code fragments on request, but this seems like a generic type of question so I won't for now.

Thanks,

Outcomes