Having a problem with a toolbar button.
I want it to show or hide it based upon access rules.

I defeined it as follows
Code:
                tbar: [{
                    text: 'Global Sync',
                    id : "EAdminDistributionManager-global-sync-btn",
                    tooltip: 'Sync all tools to the current APD directory',
                    hidden : false,
                    scope: this,
                    handler: function(){
                        gridTool.getGridEl().mask('Global Sync request in process . . . please wait ');
                        Ext.Ajax.request({
                            url :  EAdmin.DistributionManager.prototype.phpFile,
                            success : function(){
                                gridTool.getGridEl().unmask(true);                     
                            },
                            failure : function(){
                                gridTool.getGridEl().unmask(true); 
                            },
                            params: {
                                'fileName'   : EAdmin.DistributionManager.prototype.phpFile,
                                'moduleId'   : EAdmin.DistributionManager.prototype.moduleId,
                                'action'     : 'globalSync',
                                'overrideAutoMan' : 'true'    
                            }
        
                        });                                                                 
                    }
Now when I try and hide using
Code:
            if (EAdmin.data.groupInfo.description == "Staff") {
                 Ext.getCmp('EAdminDistributionManager-global-sync-btn').hide();
            }
nothing occurs, but if I define the button with hidden: true and show it using
Code:
            if (EAdmin.data.groupInfo.description == "Staff") {
                 Ext.getCmp('EAdminDistributionManager-global-sync-btn').show();
            }
this works fine, what did I miss ?