I am trying to set the permission scheme of a project. I have a permission scheme named "Test".
This code passes, but the permission scheme remains "Default Software Scheme". Ideas?
public void SetPermissionScheme(Project project)
{
log.info("Setting project permission scheme");
PermissionSchemeManager permissionSchemeManager = ComponentAccessor.getPermissionSchemeManager();
permissionSchemeManager.removeSchemesFromProject( project );
Scheme permissionScheme = permissionSchemeManager.getSchemeObject("Test");
permissionSchemeManager.addSchemeToProject(project, permissionScheme);
}
This is what the audit log looks like for the project:
So the permission scheme is set, then removed for some reason?
Hi @Chris Steenwyk I never used this manager but I have few ideas
Can you try to add some logging and share the log pls?
So I added logging . There are no errors reported during the operation. I also removed the "removeSchemesFromProject" call without affecting the end result.
Is there another way to set the permission scheme?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the result of following code?
Scheme permissionScheme = permissionSchemeManager.getSchemeObject("Test");
log.error(permissionScheme)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have exactely the same problem, in the audit logs I can see that the scheme is set correctely by my plugin, but then is overwritten to the standard scheme.
Does anyone have the solution now ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.