use of com.synopsys.integration.jira.common.model.response.PermissionModel in project hub-alert by blackducksoftware.
the class JiraCloudGlobalFieldModelTestAction method isUserAdmin.
@Override
protected boolean isUserAdmin(FieldUtility fieldUtility) throws IntegrationException {
JiraCloudProperties jiraProperties = jiraCloudPropertiesFactory.createJiraProperties(fieldUtility);
JiraCloudServiceFactory jiraCloudServiceFactory = jiraProperties.createJiraServicesCloudFactory(logger, gson);
MyPermissionsService myPermissionsService = jiraCloudServiceFactory.createMyPermissionsService();
MultiPermissionResponseModel myPermissions = myPermissionsService.getMyPermissions(JiraGlobalFieldModelTestAction.JIRA_ADMIN_PERMISSION_NAME);
PermissionModel adminPermission = myPermissions.extractPermission(JiraGlobalFieldModelTestAction.JIRA_ADMIN_PERMISSION_NAME);
return null != adminPermission && adminPermission.getHavePermission();
}
use of com.synopsys.integration.jira.common.model.response.PermissionModel in project hub-alert by blackducksoftware.
the class JiraServerGlobalFieldModelTestAction method isUserAdmin.
@Override
protected boolean isUserAdmin(FieldUtility fieldUtility) throws IntegrationException {
JiraServerProperties jiraProperties = createJiraProperties(fieldUtility);
JiraServerServiceFactory jiraServerServiceFactory = jiraProperties.createJiraServicesServerFactory(logger, gson);
MyPermissionsService myPermissionsService = jiraServerServiceFactory.createMyPermissionsService();
MultiPermissionResponseModel myPermissions = myPermissionsService.getMyPermissions();
PermissionModel adminPermission = myPermissions.extractPermission(JiraGlobalFieldModelTestAction.JIRA_ADMIN_PERMISSION_NAME);
return null != adminPermission && adminPermission.getHavePermission();
}
use of com.synopsys.integration.jira.common.model.response.PermissionModel in project hub-alert by blackducksoftware.
the class JiraServerGlobalTestActionWrapper method isUserAdmin.
public boolean isUserAdmin() throws IntegrationException {
MyPermissionsService myPermissionsService = jiraServerServiceFactory.createMyPermissionsService();
MultiPermissionResponseModel myPermissions = myPermissionsService.getMyPermissions();
PermissionModel adminPermission = myPermissions.extractPermission(JiraServerGlobalTestAction.JIRA_ADMIN_PERMISSION_NAME);
return null != adminPermission && adminPermission.getHavePermission();
}
Aggregations