I have a confluence plugin that we have in production for a while now. Recently we figured out that (sometimes) when the plugin sets the ContentPermission.VIEW_PERMISSION for a group an a page, it also adds the editing permission.
I tried the same code within a groovy console and it works as I would expected but the java code seems to fail occasionally, since we have some pages where the permissions are set correctly.
I have a page event listener that listens for specific changes to the site and executes this code
ContentPermission xxxViewPermission = ContentPermission.createGroupPermission(ContentPermission.VIEW_PERMISSION, "member-xxx"); page.addPermission(xxxViewPermission); pageManager.saveContentEntity(page, DefaultSaveContext.builder().suppressNotifications(false).suppressEvents(true).build());
Does anyone have an idea what could cause this?
Edit - some more details:
Confluence Server 7.4.8
The system im building the plugin on:
ATLAS Version: 8.2.2
ATLAS Home: C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.2
ATLAS Scripts: C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.2\bin
ATLAS Maven Home: C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.2\apache-maven-3.5.4
AMPS Version: 8.1.0