Hide from the admin menu unless explicitly set in ``ADMIN_MENU_ORDER``.
164094
def has_module_permission(self, request):
        
        for (name, items) in settings.ADMIN_MENU_ORDER:
            if "blog.BlogCategory" in items:
                return True
        return False
595844
public function dismiss_notice() {
		if ( empty( $_POST ) ) {
			die();
		}
		if ( ! isset( $_POST['id'] ) ) {
			die();
		}
		$id = \sanitize_text_field( $_POST['id'] );
		if ( $id !== $this->link_id ) {
			die();
		}

		\update_option( $this->key . 'isdone', 'yes' );
		die();
	}
1290880
def hide(self):
        
        top = self.get_top_widget()
        if isinstance(top, (list, tuple)):
            for t in top:
                if t is not None:
                    t.hide_all()
        elif top is not None:
            top.hide_all()
175460
function _setMenuItemsVisible() {
        var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE),
            cMenuItems = [Commands.FILE_SAVE, Commands.FILE_RENAME, Commands.NAVIGATE_SHOW_IN_FILE_TREE, Commands.NAVIGATE_SHOW_IN_OS],
            // Enable menu options when no file is present in active pane
            enable = !file || (file.constructor.name !== "RemoteFile");
        
            // Enable or disable commands based on whether the file is a remoteFile or not.
            cMenuItems.forEach(function (item) {
                CommandManager.get(item).setEnabled(enable);
            });
    }
110130
function() {
        this.fireEvent('hiding');

        this.container.removeClass('move-' + this.opposite);

        this.element
            .conceal()
            .removeClass('is-expanded')
            .aria('expanded', false);

        if (this.options.stopScroll) {
            $('body').removeClass('no-scroll');
        }

        this.fireEvent('hidden');
    }
971754
public function down()
    {
        PermissionsManager::deleteRole('admin', 'Administrator');
        PermissionsManager::deleteRole('user', 'User');
        PermissionsManager::deleteRole('banned', 'Banned user');

        PermissionsManager::deletePermission('login', 'Allow login');
        PermissionsManager::deletePermission('panel', 'Allow access to admin panel');
    }
1283238
def disable(cls, args):
        """"""
        mgr = NAppsManager()

        if args['all']:
            napps = mgr.get_enabled()
        else:
            napps = args['<napp>']

        for napp in napps:
            mgr.set_napp(*napp)
            LOG.info('NApp %s:', mgr.napp_id)
            cls.disable_napp(mgr)
370314
def disable(iface):
    '''
    
    '''
    if is_disabled(iface):
        return True
    cmd = ['netsh', 'interface', 'set', 'interface',
           'name={0}'.format(iface),
           'admin=DISABLED']
    __salt__['cmd.run'](cmd, python_shell=False)
    return is_disabled(iface)
89763
def delete_menu(self, menu):
        
        if menu.parent is None:
            del self.menus[menu.name()]
        menu._delete()
453946
protected function controlMaintenanceMode()
    {
        $allowed_path = $this->is_install
            || $this->is_backend
            || in_array($this->path, array('login', 'logout', 'forgot'));

        if ($this->is_maintenance && !$allowed_path) {

            if (!$this->isFront()) {
                $this->redirect('/');
            }

            $this->outputMaintenance();
        }
    }
68098
void closeAllChoices() {

        if (m_choice != null) {
            m_choice.hide();
        }
        m_choice = null;
        for (CmsChoiceSubmenu submenu : new ArrayList<CmsChoiceSubmenu>(m_submenus)) {
            removeSubmenu(submenu);
        }
    }
1180291
public void hideEnhancedOptions(boolean hide) {

        if (hide) {
            addStyleName(I_CmsLayoutBundle.INSTANCE.previewDialogCss().hiding());
        } else {
            removeStyleName(I_CmsLayoutBundle.INSTANCE.previewDialogCss().hiding());
        }
    }
968409
function () {
        var self = this;

        if (self.menu) {
          self.menu.items().each(function (item) {
            if (item.hideMenu) {
              item.hideMenu();
            }
          });

          self.menu.hide();
          self.aria('expanded', false);
        }

        return self;
      }
1128280
public void hide() {
    mDismissed = true;
    removeCallbacks(mDelayedShow);
    long diff = System.currentTimeMillis() - mStartTime;
    if (diff >= MIN_SHOW_TIME || mStartTime == -1) {
      // The progress spinner has been shown long enough
      // OR was not shown yet. If it wasn't shown yet,
      // it will just never be shown.
      setVisibility(View.GONE);
    } else {
      // The progress spinner is shown, but not long enough,
      // so put a delayed message in to hide it when its been
      // shown long enough.
      if (!mPostedHide) {
        postDelayed(mDelayedHide, MIN_SHOW_TIME - diff);
        mPostedHide = true;
      }
    }
  }
696329
protected function _listeDelLevel()
    {
        if (count($this->_defList)) {
            unset($this->_defList[count($this->_defList)-1]);
            $this->_defList = array_values($this->_defList);
        }
    }
1034515
public static function switchToHidden() {
		self::$hiddenInstance = self::$defaultInstance;
		self::$defaultInstance = new MoufManager();
		self::$defaultInstance->configManager = new MoufConfigManager("../../config.php");
		self::$defaultInstance->componentsFileName = "../../mouf/MoufComponents.php";
		//self::$defaultInstance->requireFileName = "MoufAdminRequire.php";
		self::$defaultInstance->adminUiFileName = "../../mouf/MoufUI.php";
		self::$defaultInstance->mainClassName = "MoufAdmin";
		self::$defaultInstance->scope = MoufManager::SCOPE_ADMIN;
	}
203473
public void hideDeniedColumn() {

        if (m_editable) {
            m_permissions.setVisibleColumns(PROPERTY_LABEL, PROPERTY_ALLOWED);
        } else {
            m_permissions.setVisibleColumns(PROPERTY_LABEL, PROPERTY_DISPLAY_ALLOWED);
        }
    }