used to raise warning if the user got parameter
        that we do not manage from now

        :return: None
343730
def warn_about_unmanaged_parameters(self):
        
        properties = self.__class__.properties
        unmanaged = []
        for prop, entry in list(properties.items()):
            if not entry.managed and hasattr(self, prop):
                if entry.help:
                    line = "%s: %s" % (prop, entry.help)
                else:
                    line = prop
                unmanaged.append(line)
        if unmanaged:
            logger.warning("The following Nagios legacy parameter(s) are not currently "
                           "managed by Alignak:")

            for line in unmanaged:
                logger.warning('- %s', line)

            logger.warning("Those are unmanaged configuration statements, do you really need it? "
                           "Create an issue on the Alignak repository or submit a pull "
                           "request: http://www.github.com/Alignak-monitoring/alignak")
527064
def login_required(method):
    """"""
    def wrapper(self, *arg, **karg):
        if not self.user:
            if self.request.method == "GET":
                self.redirect(settings.LOGIN_PATH)
            else:
                self.error(403)
        else:
            method(self, *arg, **karg)
    return wrapper
368975
def is_user(value, min=None, max=None):
    

    if type(value) == str:
        try:
            entry = pwd.getpwnam(value)
            value = entry.pw_uid
        except KeyError:
            err_message = ('{0}: No such user.'.format(value))
            raise validate.VdtValueError(err_message)

        return value

    elif type(value) == int:
        try:
            pwd.getpwuid(value)
        except KeyError:
            err_message = ('{0}: No such user.'.format(value))
            raise validate.VdtValueError(err_message)

        return value

    else:
        err_message = ('Please, use str or int to "user" parameter.')
        raise validate.VdtTypeError(err_message)
519067
def skips(self, user):
        
        return self._get(self._build_url(self.endpoint.skips(id=user)))
121314
def check_contract_allowed(func):
    
    @wraps(func)
    def decorator(*args, **kwargs):
        contract = kwargs.get('contract')
        if (contract and current_user.is_authenticated()
                and not current_user.allowed(contract)):
            return current_app.login_manager.unauthorized()
        return func(*args, **kwargs)
    return decorator
525167
def _reset_param(self, param):
        
        if param not in self._instance.CONFIG_PARAMS:
            raise ValueError("Cannot reset unknown parameter '{}'".format(param))
        setattr(self, param, self._instance.CONFIG_PARAMS[param])
266703
def get_allow_future(self):
        
        qs = self.get_queryset()
        post_edit_permission = '{}.edit_{}'.format(
            qs.model._meta.app_label, qs.model._meta.model_name
        )
        if self.request.user.has_perm(post_edit_permission):
            return True
        return False
428026
def _check_load_parameters(self, **kwargs):
        

        if 'partition' in kwargs:
            msg = "'partition' is not allowed as a load parameter. Vcmp " \
                "guests are accessed by name."
            raise DisallowedReadParameter(msg)
        super(Virtual_Disk, self)._check_load_parameters(**kwargs)
148967
def _get_required_param(self, param_name):
    
    value = self.request.get(param_name)
    if not value:
      raise errors.NotEnoughArgumentsError(param_name + " not specified")
    return value
730108
def _check_load_parameters(self, **kwargs):
        
        rset = self._meta_data['required_load_parameters']
        check = _missing_required_parameters(rset, **kwargs)
        if check:
            check.sort()
            error_message = 'Missing required params: %s' % check
            raise MissingRequiredReadParameter(error_message)
834275
def _can_access_request(self):
        
        if self.parent:
            return False

        if not hasattr(self, "context") or not self.context.get("request", None):
            return False

        return self.context["request"].method == "GET"
474543
def _checkSetupNeeded(self, message):
        
        # In OpenID 1, we check to see if this is a cancel from
        # immediate mode by the presence of the user_setup_url
        # parameter.
        if message.isOpenID1():
            user_setup_url = message.getArg(OPENID1_NS, 'user_setup_url')
            if user_setup_url is not None:
                raise SetupNeededError(user_setup_url)
183929
def has_required_params(self):
        '''
        
        '''
        return self.consumer_key and\
                self.consumer_secret and\
                self.resource_link_id and\
                self.launch_url
1271023
def _is_url_in_cache(*args, **kwargs):
    
    # Only include allowed arguments for a PreparedRequest.
    allowed_args = inspect.getargspec(
        requests.models.PreparedRequest.prepare).args
    # self is in there as .prepare() is a method.
    allowed_args.remove('self')

    kwargs_cleaned = {}
    for key, value in dict(kwargs).items():
        if key in allowed_args:
            kwargs_cleaned[key] = value

    prepared_request = _prepare(*args, **kwargs_cleaned)
    request_hash = _get_hash(prepared_request)
    try:
        return requests_cache.get_cache().has_key(request_hash)
    except AttributeError as e:  # requests_cache not enabled
        if str(e) == "'Session' object has no attribute 'cache'":
            return False
        raise
708381
def _handle_parameter(self, default):
        
        key = None
        showkey = False
        self._push()
        while self._tokens:
            token = self._tokens.pop()
            if isinstance(token, tokens.TemplateParamEquals):
                key = self._pop()
                showkey = True
                self._push()
            elif isinstance(token, (tokens.TemplateParamSeparator,
                                    tokens.TemplateClose)):
                self._tokens.append(token)
                value = self._pop()
                if key is None:
                    key = Wikicode(SmartList([Text(str(default))]))
                return Parameter(key, value, showkey)
            else:
                self._write(self._handle_token(token))
        raise ParserError("_handle_parameter() missed a close token")
411043
def check_user(self, user_id):
        

        if self.hidden == 'N':
            return True

        for owner in self.owners:
            if int(owner.user_id) == int(user_id):
                if owner.view == 'Y':
                    return True
        return False
323031
def getent(refresh=False):
    '''
    
    '''
    if 'user.getent' in __context__ and not refresh:
        return __context__['user.getent']

    ret = []
    for data in pwd.getpwall():
        ret.append(info(data.pw_name))
    __context__['user.getent'] = ret
    return ret