Hi, i'm making a plugin, i make the next class:
package com.inlogiq.plugins.permissions;
import javax.inject.Named;
import com.atlassian.plugin.spring.scanner.annotation.export.ExportAsService;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.security.roles.ProjectRoleManager;
import com.atlassian.jira.security.roles.ProjectRole;
import com.atlassian.jira.security.roles.ProjectRoleImpl;
import javax.inject.Inject;
import com.atlassian.jira.user.ApplicationUser;
import com.atlassian.jira.project.Project;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ExportAsService({ManagerPermissions.class})
@Named("ManagerPermissions")
public class ManagerPermissions {
private static final Logger log = LoggerFactory.getLogger(ManagerPermissions.class);
//ProjectRole pluginRole;
@Inject
public ManagerPermissions(){
ProjectRoleManager roleManager = ComponentAccessor.getComponent(ProjectRoleManager.class);
ProjectRole foundedRole = roleManager.getProjectRole("MyBolsa");
log.warn("Rol encontrado: " + foundedRole);
if (foundedRole == null) {
ProjectRole myRole = new ProjectRoleImpl("MyBolsa", "My Own Role");
roleManager.createRole(myRole);
}
}
}
When i make and atlas-mvn package works correctly, create a new role called MyBolsa, the problem comes when i stop Jira and and atlas-run then jira can't start
Your server isn't accepting the connection for some reason. You'll need to read the logs for more details
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.