Confluence 8.8 release EAP available now

Here’s another subtle 8.8 landmine in which even cross-minor compatibility is broken. If you use PermissionManager for anything, the very act of upgrading your POM to compile against 8.8.0 will potentially break your app on older versions of Confluence. Everything will seem fine when you build, but it will fail at runtime.

In 8.7 and prior, PermissionManager used the User type for almost everything. In 8.8, these methods were marked as @Deprecated for removal. A new set of parallel methods were added in 8.8 that use ConfluenceUser, but these methods do not exist in 8.7 and below.

If you were being good citizens and already using the ConfluenceUser class in your own code, then the following will no longer work at runtime on <=8.7 if you build against 8.8:

ConfluenceUser user = /* ... */;

if (permissionManager.hasPermission(user, Permission.WHATEVER, content)) { 
   /* ... */

That’s because your classes will now be built against the method signature hasPermission(ConfluenceUser, Permission, Object), which does not exist in <=8.7.

You can typecast this to (User) to get it to work cross-version for now, at the cost of getting deprecation warnings, but who knows if this will still work in 9.0 or if we’ll all have to implement some reflection.

Hey, Atlassian (@kmacleod ?), any chance of retaining the User-signature methods here in 9.x? Deprecating starting only in 8.8 and removing in 9.0 is…fast…and it doesn’t seem like there is any particular impact to security here.

7 Likes