ApplicationUser, JiraHelper is null in shouldDisplay function of AbstractWebCondition


I’m implementing conditional web-resource.

so, here is my code

<!-- atlassian-plugin.xml-->
  <web-resource key="myplugin-resources" name="myplugin Web Resources">
    <resource type="download" name="myplugin.css" location="/css/myplugin.css"/>  
    <resource type="download" name="myplugin.js" location="/js/MLMmypluginlugin.js"/>
    <condition class="com.mycompany.jira.myplugin.AAACond"></condition>

and here is AAACond Java code

public class AAACond extends AbstractWebCondition {
    private Map<String,String> params;
    public void init(Map<String,String> params) throws PluginParseException {
        this.params = params;
        System.out.println(params) ;
    public boolean shouldDisplay(ApplicationUser user, JiraHelper jiraHelper) {
        boolean out = true ;
        System.out.println(user) ;
        System.out.println(jiraHelper) ;
        return out ;

ApplicationUser and JiraHelper is alway null.

I’m glad for any suggestion or help.

You do not have access to JiraHelper or ApplicationUser in Web Resource conditions: