This is about a bug in Confluence 6.5.0 and later that I've already discussed with the Confluence team on App Week in Amsterdam. I wanted to submit this through the official channel as well in order to raise awareness a bit because this problem prevents us from marking two of our most important apps (Scroll Versions and Scroll Translations) as compatible with Confluence 6.5.
Since this bug could break the content publishing workflows of our customers we're very reluctant to mark the apps as compatible. And while it appears not to be a bug in our code base, to our customers it looks like we're screwing up the compatibility update. We got quite a few update requests in the meantime.
- Unzip duplicate-permissions.zip
- run atlas-debug
- Wait until Confluence has started
- Open the project in Idea (any IDE)
- Launch the unit tests in the single test class; note @Ignore annotations in ContentPermissionErrorTest#works and ContentPermissionErrorTest#fails
Unit tests should pass.
Unit test ContentPermissionErrorTest#fails fails, see stacktrace.txt for logs.
Basically, the error happens whenever you call getInheritedContentPermissionSets on a child page (this is where the duplicates are put into the cache for the parent page), then afterwards call setContentPermissions on the parent in order to remove permissions. This exception is raised in HibernatePageDao in the method getDescendants() on query.list().
These calls do not necessarily need to come from within our plugin.