<commit_before>package rundeck

import com.dtolabs.rundeck.core.common.Framework
import rundeck.services.FrameworkService

class PluginTagLib {
    def static namespace = "stepplugin"
    def FrameworkService frameworkService

    def display={attrs,body->
        def step=attrs.step
        def Framework framework = frameworkService.getFrameworkFromUserSession(request.session, request)
        def description = frameworkService.getPluginDescriptionForItem(framework, step)
        if(description){
            out << render(template: "/framework/renderPluginConfig", model: [type: step.type, values: step?.configuration, description: description] + attrs.subMap(['prefix', 'includeFormFields']))
        }else{
            out << "Plugin " + (step.nodeStep ? "Node" : "") + " Step (${step.type})"
        }

    }
}<commit_msg>Allow render mail notification gsp without session<commit_after>package rundeck

import com.dtolabs.rundeck.core.common.Framework
import rundeck.services.FrameworkService

class PluginTagLib {
    def static namespace = "stepplugin"
    def FrameworkService frameworkService

    def display={attrs,body->
        def step=attrs.step
        if(request.session?.user && request?.session?.subject){
            def Framework framework = frameworkService.getFrameworkFromUserSession(request.session, request)
            def description = frameworkService.getPluginDescriptionForItem(framework, step)
            if(description){
                out << render(template: "/framework/renderPluginConfig", model: [type: step.type, values: step?.configuration, description: description] + attrs.subMap(['prefix', 'includeFormFields']))
                return
            }
        }
        out << "Plugin " + (step.nodeStep ? "Node" : "") + " Step (${step.type})"
    }
}
{'fraction_non_alphanumeric': 0.1117908787541713, 'fraction_numerical': 0.0, 'mean_word_length': 3.452970297029703, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4438110', 'n_tokens_mistral': 466, 'n_tokens_neox': 453, 'n_words': 104}