<commit_before><?php
/**
 * HiPanel DNS Module
 *
 * @link      https://github.com/hiqdev/hipanel-module-dns
 * @package   hipanel-module-dns
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
 */

namespace hipanel\modules\dns\menus;

use Yii;

class HostingSidebarSubMenu extends \hiqdev\yii2\menus\Menu
{
    public function items()
    {
        return [
            'hosting' => [
                'items' => [
                    'dns' => [
                        'label' => Yii::t('hipanel:dns', 'DNS'),
                        'url'   => ['/dns/zone/index'],
                    ],
                ],
            ],
        ];
    }
}
<commit_msg>add visibility for menu (#18)<commit_after><?php
/**
 * HiPanel DNS Module
 *
 * @link      https://github.com/hiqdev/hipanel-module-dns
 * @package   hipanel-module-dns
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
 */

namespace hipanel\modules\dns\menus;

use Yii;

class HostingSidebarSubMenu extends \hiqdev\yii2\menus\Menu
{
    public function items()
    {
        return [
            'hosting' => [
                'items' => [
                    'dns' => [
                        'label' => Yii::t('hipanel:dns', 'DNS'),
                        'url'   => ['/dns/zone/index'],
                        'visible' => Yii::$app->user->can('dns.read'),
                    ],
                ],
            ],
        ];
    }
}

{'fraction_non_alphanumeric': 0.1604855023600809, 'fraction_numerical': 0.014834794335805798, 'mean_word_length': 1.4774624373956595, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 2, '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': '5377851', 'n_tokens_mistral': 508, 'n_tokens_neox': 486, 'n_words': 78}