equal
deleted
inserted
replaced
78 save_message: the message to display when the entity is saved |
78 save_message: the message to display when the entity is saved |
79 edit_params: the params to use when editing |
79 edit_params: the params to use when editing |
80 """ |
80 """ |
81 |
81 |
82 new_rights = {} |
82 new_rights = {} |
83 new_rights['any_access'] = [access.checkIsLoggedIn] |
83 new_rights['any_access'] = [access.checkIsUser] |
84 |
84 |
85 self._rights = dicts.merge(rights, new_rights) |
85 self._rights = dicts.merge(rights, new_rights) |
86 self._params = params |
86 self._params = params |
87 |
87 |
88 def public(self, request, page=None, **kwargs): |
88 def public(self, request, page=None, **kwargs): |
383 True: If all the required access checks have been made successfully |
383 True: If all the required access checks have been made successfully |
384 False: If a check failed, in this case self._response will contain |
384 False: If a check failed, in this case self._response will contain |
385 the response provided by the failed access check. |
385 the response provided by the failed access check. |
386 """ |
386 """ |
387 |
387 |
|
388 # Call each access checker |
|
389 for check in self._rights['any_access']: |
|
390 check(request) |
|
391 |
388 if access_type not in self._rights: |
392 if access_type not in self._rights: |
389 # No checks defined, so do the 'generic check' and bail out |
393 # No checks defined, so do the 'generic check' and bail out |
390 self.checkUnspecified(access_type, request) |
394 self.checkUnspecified(access_type, request) |
391 return |
395 return |
392 |
396 |
393 # Call each access checker |
|
394 for check in self._rights['any_access']: |
|
395 check(request) |
|
396 |
|
397 for check in self._rights[access_type]: |
397 for check in self._rights[access_type]: |
398 check(request) |
398 check(request) |
399 |
399 |
400 def collectCleanedFields(self, form): |
400 def collectCleanedFields(self, form): |
401 """Collects all cleaned fields from form and returns them |
401 """Collects all cleaned fields from form and returns them |