equal
deleted
inserted
replaced
277 |
277 |
278 base = params.get('rights') if params else None |
278 base = params.get('rights') if params else None |
279 self.rights = base.rights if base else {} |
279 self.rights = base.rights if base else {} |
280 self.id = None |
280 self.id = None |
281 self.user = None |
281 self.user = None |
282 self.core = callback.getCore() |
|
283 |
282 |
284 def normalizeChecker(self, checker): |
283 def normalizeChecker(self, checker): |
285 """Normalizes the checker to a pre-defined format. |
284 """Normalizes the checker to a pre-defined format. |
286 |
285 |
287 The result is guaranteed to be a list of 2-tuples, the first element is a |
286 The result is guaranteed to be a list of 2-tuples, the first element is a |
319 def put(self, checker_name, value): |
318 def put(self, checker_name, value): |
320 """Puts the result for the specified checker in the cache. |
319 """Puts the result for the specified checker in the cache. |
321 """ |
320 """ |
322 |
321 |
323 cache_key = self.key(checker_name) |
322 cache_key = self.key(checker_name) |
324 self.core.setRequestValue(cache_key, value) |
323 callback.getCore().setRequestValue(cache_key, value) |
325 |
324 |
326 def get(self, checker_name): |
325 def get(self, checker_name): |
327 """Retrieves the result for the specified checker from cache. |
326 """Retrieves the result for the specified checker from cache. |
328 """ |
327 """ |
329 |
328 |
330 cache_key = self.key(checker_name) |
329 cache_key = self.key(checker_name) |
331 return self.core.getRequestValue(cache_key) |
330 return callback.getCore().getRequestValue(cache_key) |
332 |
331 |
333 def doCheck(self, checker_name, django_args, args): |
332 def doCheck(self, checker_name, django_args, args): |
334 """Runs the specified checker with the specified arguments. |
333 """Runs the specified checker with the specified arguments. |
335 """ |
334 """ |
336 |
335 |