public function canCreate($member=null)
    {
        if (!$member) {
            $member = singleton('SecurityContext')->getMember();
        }
        
        if ($member) {
            // check dashboard controller's allowed_dashlets
            $allowed = Config::inst()->get('DashboardController', 'allowed_dashlets');
            if (in_array(get_class($this), $allowed)) {
                return true;
            }
            
            $config = SiteConfig::current_site_config();
            $required = $this->requiredPermission();
            if ($config->hasMethod('checkPerm') && $config->checkPerm($required)) {
                return true;
            }
        }
        
        
        return parent::canCreate($member);
    }
public function canCreate($member=null)
    {
        if (!$member) {
            $member = singleton('SecurityContext')->getMember();
        }
        
        if ($member) {
            // check dashboard controller's allowed_dashlets
            $allowed = Config::inst()->get('DashboardController', 'allowed_dashlets');
            if (in_array(get_class($this), $allowed)) {
                return true;
            }
            
            $config = SiteConfig::current_site_config();
            $required = $this->requiredPermission();
            if ($config->hasMethod('checkPerm') && $config->checkPerm($required)) {
                return true;
            }
        }
        
        
        return parent::canCreate($member);
    }
public function canCreate ( $ member = null ) { if ( ! $ member ) { $ member = singleton ( 'SecurityContext' ) -> getMember ( ) ; } if ( $ member ) { // check dashboard controller's allowed_dashlets $ allowed = Config :: inst ( ) -> get ( 'DashboardController' , 'allowed_dashlets' ) ; if ( in_array ( get_class ( $ this ) , $ allowed ) ) { return true ; } $ config = SiteConfig :: current_site_config ( ) ; $ required = $ this -> requiredPermission ( ) ; if ( $ config -> hasMethod ( 'checkPerm' ) && $ config -> checkPerm ( $ required ) ) { return true ; } } return parent :: canCreate ( $ member ) ; }
Can this dashlet be created by the current user?

@param type $member
@return type
Can this dashlet be created by the current user?