Property that checks if the specified window is private or not.

        Returns:
            bool: True if this is a Private Browsing window.
424866
def is_private(self):
        
        self.switch_to()
        with self.selenium.context(self.selenium.CONTEXT_CHROME):
            return self.selenium.execute_script(
                """
                Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");

                let chromeWindow = arguments[0].ownerDocument.defaultView;
                return PrivateBrowsingUtils.isWindowPrivate(chromeWindow);
                """,
                self.document_element,
            )
1348626
def env_is_exposed(self, tgt_env):
        '''
        
        '''
        return salt.utils.stringutils.check_whitelist_blacklist(
            tgt_env,
            whitelist=self.saltenv_whitelist,
            blacklist=self.saltenv_blacklist,
        )
663283
def is_client(self):
        """"""
        return (self.args.client or self.args.browser) and not self.args.server
671975
protected function checkBrowserSeaMonkey() {
	    if( stripos($this->_agent,'SeaMonkey') !== false ) {
		    $aversion = explode('/',stristr($this->_agent,'SeaMonkey'));
		    $this->setVersion($aversion[1]);
		    $this->setBrowser(self::BROWSER_SEAMONKEY);
			return true;
	    }
	    return false;
    }
323817
function privateBrowsing(controller) {
  this._controller = controller;
  this._handler = null;

  /**
   * Menu item in the main menu to enter/leave Private Browsing mode
   * @private
   */
  this._pbMenuItem = new elementslib.Elem(this._controller.menus['tools-menu'].privateBrowsingItem);
  this._pbTransitionItem = new elementslib.ID(this._controller.window.document, "Tools:PrivateBrowsing");

  this.__defineGetter__('_pbs', function() {
    delete this._pbs;
    return this._pbs = Cc["@mozilla.org/privatebrowsing;1"].
                       getService(Ci.nsIPrivateBrowsingService);
  });
}
929501
def can_access(self, permission_name, view_name):
        """"""
        user = g.user
        if user.is_anonymous:
            return self.is_item_public(permission_name, view_name)
        return self._has_view_access(user, permission_name, view_name)
784586
def can_read(self):
        
        sm = getSecurityManager()
        if not sm.checkPermission(permissions.View, self.context):
            return False
        return True
369059
def can_view(self, user):
        """"""
        return user.is_admin or user in self.users \
            or self.project.class_ in user.admin_for
556291
def is_open(location=None, attr=None):
    
    obj = utils.is_open(location)
    if obj is False:
        return False
    if attr is not None:
        return getattr(obj, attr)
    return obj
999551
def _check_view_permission(self, view):
        
        security = get_service("security")
        return security.has_permission(current_user, view.permission, self.obj)
110052
def allowed_to_preview(user):
    
    if (
        user.is_authenticated and
        user.is_active and
        user.is_staff
    ):
        return True
    return False
1214244
def is_private(self):
        
        private_10 = IPv4Network('10.0.0.0/8')
        private_172 = IPv4Network('172.16.0.0/12')
        private_192 = IPv4Network('192.168.0.0/16')
        return (self in private_10 or
                self in private_172 or
                self in private_192)
908242
public static boolean isWindows() {
		String os = System.getProperty("os.name").toLowerCase();
		return os.indexOf("windows") != -1 || os.indexOf("nt") != -1;
	}
1219304
def filter_zone(self, data):
        """"""
        if self.private_zone is not None:
            if data['Config']['PrivateZone'] != self.str2bool(self.private_zone):
                return False

        if data['Name'] != '{0}.'.format(self.domain):
            return False

        return True
282412
def get_comments_are_open(instance):
    
    if not IS_INSTALLED:
        return False

    try:
        # Get the moderator which is installed for this model.
        mod = moderator._registry[instance.__class__]
    except KeyError:
        # No moderator = no restrictions
        return True

    # Check the 'enable_field', 'auto_close_field' and 'close_after',
    # by reusing the basic Django policies.
    return CommentModerator.allow(mod, None, instance, None)
960056
def get_private_rooms(self, **kwargs):
        
        return GetPrivateRooms(settings=self.settings, **kwargs).call(**kwargs)
1304270
private boolean isTilingViewAllowed() {

        if (m_types.size() == 0) {
            return false;
        }
        for (String typeName : m_types) {
            if (!isImagelikeType(typeName)) {
                return false;
            }
        }
        return true;

    }