Commit 877f99de authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

we no longer need '/view' in the url.

(more modification should be required.)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40351 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e09fda17
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<value> <string>"""\n <value> <string>"""\n
Used in listbox to generate proper root link\n Used in listbox to generate proper root link\n
"""\n """\n
return \'%s/view\' %brain.getParentValue().absolute_url()\n return brain.getParentValue().absolute_url()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
75 76
\ No newline at end of file \ No newline at end of file
...@@ -180,7 +180,7 @@ for line in line_list:\n ...@@ -180,7 +180,7 @@ for line in line_list:\n
else:\n else:\n
ical_item_dict[\'COMPONENT\'] = \'journal\'\n ical_item_dict[\'COMPONENT\'] = \'journal\'\n
elif field_upper == \'URL\' and hasattr(brainObject, \'absolute_url\'):\n elif field_upper == \'URL\' and hasattr(brainObject, \'absolute_url\'):\n
ical_item_dict[\'URL\'] = brainObject.absolute_url() + \'/view\'\n ical_item_dict[\'URL\'] = brainObject.absolute_url()\n
elif field_upper == \'DTSTAMP\':\n elif field_upper == \'DTSTAMP\':\n
ical_item_dict[\'DTSTAMP\'] = convertDate(now)\n ical_item_dict[\'DTSTAMP\'] = convertDate(now)\n
elif field_upper == \'DTSTART\':\n elif field_upper == \'DTSTART\':\n
......
20 21
\ No newline at end of file \ No newline at end of file
...@@ -150,7 +150,7 @@ for line in line_list:\n ...@@ -150,7 +150,7 @@ for line in line_list:\n
elif required_field == \'link\':\n elif required_field == \'link\':\n
if hasattr(line.getBrain(), \'absolute_url\'):\n if hasattr(line.getBrain(), \'absolute_url\'):\n
field_data = unicode(line.getBrain().absolute_url(), \'utf-8\' ) or \'\'\n field_data = unicode(line.getBrain().absolute_url(), \'utf-8\' ) or \'\'\n
rss_item_string += (\'\\t\\t\\t<%s>%s/view</%s>\\n\' % (required_field, field_data, required_field))\n rss_item_string += (\'\\t\\t\\t<%s>%s</%s>\\n\' % (required_field, field_data, required_field))\n
elif required_field == \'description\':\n elif required_field == \'description\':\n
if hasattr(line.getBrain(), \'getDescription\'):\n if hasattr(line.getBrain(), \'getDescription\'):\n
field_data = html_quote(unicode(line.getBrain().getDescription(), \'utf-8\' ) or \'\')\n field_data = html_quote(unicode(line.getBrain().getDescription(), \'utf-8\' ) or \'\')\n
......
48 49
\ No newline at end of file \ No newline at end of file
...@@ -289,12 +289,13 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin): ...@@ -289,12 +289,13 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin):
Return a permanent URL of document in the context Return a permanent URL of document in the context
of the current section. of the current section.
If view is True, the url returned point to html content and can be
opened in a browser (ie. + '/view' for ooo documents)
This method must be implemented through a This method must be implemented through a
portal type dependent script: portal type dependent script:
WebSection_getPermanentURL WebSection_getPermanentURL
XXX The following argument is obsoleted because we no longer need /view.
If view is True, the url returned point to html content and can be
opened in a browser (ie. + '/view' for ooo documents)
""" """
cache = getReadOnlyTransactionCache() cache = getReadOnlyTransactionCache()
if cache is not None: if cache is not None:
......
...@@ -137,7 +137,7 @@ class Wiki( Document ): ...@@ -137,7 +137,7 @@ class Wiki( Document ):
append(name[1:]) append(name[1:])
else: else:
# FIMXE: Create a new wiki instance if not present. # FIMXE: Create a new wiki instance if not present.
append('<a href="%s/%s/view">%s</a>' % (self._getTopLevelUrl(), name, name)) append('<a href="%s/%s">%s</a>' % (self._getTopLevelUrl(), name, name))
elif min_key == 'url': elif min_key == 'url':
url = match.string[match.start(1):match.end(1)] url = match.string[match.start(1):match.end(1)]
if url.startswith('!'): if url.startswith('!'):
...@@ -159,7 +159,7 @@ class Wiki( Document ): ...@@ -159,7 +159,7 @@ class Wiki( Document ):
label = self._render_text(label) label = self._render_text(label)
if self.wiki_name_expr.search(link): if self.wiki_name_expr.search(link):
# FIXME: Create a new wiki instance if not present # FIXME: Create a new wiki instance if not present
append('<a href="%s/%s/view">%s</a>' % (self._getTopLevelUrl(), link, label)) append('<a href="%s/%s">%s</a>' % (self._getTopLevelUrl(), link, label))
else: else:
append('<a href="%s">%s</a>' % (link, label)) append('<a href="%s">%s</a>' % (link, label))
else: else:
......
...@@ -173,7 +173,7 @@ class InventoryListBrain(ZSQLBrain): ...@@ -173,7 +173,7 @@ class InventoryListBrain(ZSQLBrain):
# with the inventory's uid. Then they are their own explanation. # with the inventory's uid. Then they are their own explanation.
explanation = o explanation = o
if explanation is not None: if explanation is not None:
return '%s/%s/view' % ( return '%s/%s' % (
self.portal_url.getPortalObject().absolute_url(), self.portal_url.getPortalObject().absolute_url(),
explanation.getRelativeUrl()) explanation.getRelativeUrl())
else: else:
...@@ -193,7 +193,7 @@ class InventoryListBrain(ZSQLBrain): ...@@ -193,7 +193,7 @@ class InventoryListBrain(ZSQLBrain):
query_kw_update = {} query_kw_update = {}
if cname_id in ('transformed_resource_title', ): if cname_id in ('transformed_resource_title', ):
return '%s/view' % resource.absolute_url() return resource.absolute_url()
elif cname_id in ('getCurrentInventory', ): elif cname_id in ('getCurrentInventory', ):
query_kw_update = { query_kw_update = {
'simulation_state': 'simulation_state':
...@@ -242,7 +242,7 @@ class InventoryListBrain(ZSQLBrain): ...@@ -242,7 +242,7 @@ class InventoryListBrain(ZSQLBrain):
if document.isMovement(): if document.isMovement():
explanation = document.getExplanationValue() explanation = document.getExplanationValue()
if explanation is not None: if explanation is not None:
return '%s/%s/view' % ( return '%s/%s' % (
self.portal_url.getPortalObject().absolute_url(), self.portal_url.getPortalObject().absolute_url(),
explanation.getRelativeUrl()) explanation.getRelativeUrl())
return '' return ''
......
...@@ -367,7 +367,7 @@ class TemplateTool (BaseTool): ...@@ -367,7 +367,7 @@ class TemplateTool (BaseTool):
bt = self.download(url, id=id) bt = self.download(url, id=id)
if REQUEST is not None: if REQUEST is not None:
ret_url = bt.absolute_url() + '/view' ret_url = bt.absolute_url()
psm = translateString("Business template downloaded successfully.") psm = translateString("Business template downloaded successfully.")
REQUEST.RESPONSE.redirect("%s?portal_status_message=%s" REQUEST.RESPONSE.redirect("%s?portal_status_message=%s"
% (ret_url, psm)) % (ret_url, psm))
...@@ -542,7 +542,7 @@ class TemplateTool (BaseTool): ...@@ -542,7 +542,7 @@ class TemplateTool (BaseTool):
if not batch_mode and \ if not batch_mode and \
(REQUEST is not None): (REQUEST is not None):
ret_url = bt.absolute_url() + '/view' ret_url = bt.absolute_url()
psm = translateString("Business templates imported successfully.") psm = translateString("Business templates imported successfully.")
REQUEST.RESPONSE.redirect("%s?portal_status_message=%s" REQUEST.RESPONSE.redirect("%s?portal_status_message=%s"
% (ret_url, psm)) % (ret_url, psm))
......
...@@ -282,13 +282,13 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -282,13 +282,13 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
def test_frontpage(self): def test_frontpage(self):
"""Test we can view the front page. """Test we can view the front page.
""" """
response = self.publish('%s/view' % self.portal_id, self.auth) response = self.publish(self.portal_id, self.auth)
self.assertEquals(HTTP_OK, response.getStatus()) self.assertEquals(HTTP_OK, response.getStatus())
def test_login_form(self): def test_login_form(self):
"""Test anonymous user are redirected to login_form """Test anonymous user are redirected to login_form
""" """
response = self.publish('%s/view' % self.portal_id) response = self.publish(self.portal_id)
self.assertEquals(HTTP_REDIRECT, response.getStatus()) self.assertEquals(HTTP_REDIRECT, response.getStatus())
self.assertEquals('%s/login_form' % self.portal.absolute_url(), self.assertEquals('%s/login_form' % self.portal.absolute_url(),
response.getHeader('Location')) response.getHeader('Location'))
...@@ -299,7 +299,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -299,7 +299,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
'portal_templates', 'portal_templates',
'portal_rules', 'portal_rules',
'portal_alarms',): 'portal_alarms',):
response = self.publish('%s/%s/view' % (self.portal_id, tool), self.auth) response = self.publish('%s/%s' % (self.portal_id, tool), self.auth)
self.assertEquals(HTTP_OK, response.getStatus(), self.assertEquals(HTTP_OK, response.getStatus(),
"%s: %s" % (tool, response.getStatus())) "%s: %s" % (tool, response.getStatus()))
...@@ -308,7 +308,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -308,7 +308,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
translation_service = DummyTranslationService() translation_service = DummyTranslationService()
setGlobalTranslationService(translation_service) setGlobalTranslationService(translation_service)
# assumes that we can add Business Template in template tool # assumes that we can add Business Template in template tool
response = self.publish('%s/portal_templates/view' % response = self.publish('%s/portal_templates' %
self.portal_id, self.auth) self.portal_id, self.auth)
self.assertEquals(HTTP_OK, response.getStatus()) self.assertEquals(HTTP_OK, response.getStatus())
self.failUnless(('Business Template', {}) self.failUnless(('Business Template', {})
...@@ -328,7 +328,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -328,7 +328,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
title='Dummy Jump Action', title='Dummy Jump Action',
action_permission='View', action_permission='View',
action_type='object_jump') action_type='object_jump')
response = self.publish('%s/portal_templates/view' % response = self.publish('%s/portal_templates' %
self.portal_id, self.auth) self.portal_id, self.auth)
self.assertEquals(HTTP_OK, response.getStatus()) self.assertEquals(HTTP_OK, response.getStatus())
self.failUnless(('Dummy Jump Action', {}) in self.failUnless(('Dummy Jump Action', {}) in
...@@ -410,7 +410,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -410,7 +410,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
len(portal.portal_catalog(portal_type='Preference', len(portal.portal_catalog(portal_type='Preference',
title='My Test Preference')), title='My Test Preference')),
1) 1)
response = self.publish('%s/view' % self.portal_id, self.auth) response = self.publish(self.portal_id, self.auth)
self.assertEquals(HTTP_OK, response.getStatus()) self.assertEquals(HTTP_OK, response.getStatus())
def test_Folder_delete(self): def test_Folder_delete(self):
......
...@@ -516,7 +516,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -516,7 +516,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
# is rendered in web_site context # is rendered in web_site context
response = self.publish(website.absolute_url_path() + '/' +\ response = self.publish(website.absolute_url_path() + '/' +\
web_page_reference + '/view', credential) web_page_reference, credential)
self.assertEquals(response.getHeader('content-type'), self.assertEquals(response.getHeader('content-type'),
'text/html; charset=utf-8') 'text/html; charset=utf-8')
self.assertTrue('<form' in response.getBody()) # means the web_page self.assertTrue('<form' in response.getBody()) # means the web_page
...@@ -545,7 +545,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -545,7 +545,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
# image is rendered in web_site context # image is rendered in web_site context
response = self.publish(website.absolute_url_path() + '/' +\ response = self.publish(website.absolute_url_path() + '/' +\
image_reference+ '/view', credential) image_reference, credential)
self.assertEquals(response.getHeader('content-type'), self.assertEquals(response.getHeader('content-type'),
'text/html; charset=utf-8') 'text/html; charset=utf-8')
...@@ -562,7 +562,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -562,7 +562,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
'application/vnd.oasis.opendocument.presentation') 'application/vnd.oasis.opendocument.presentation')
# Document is rendered in web_site context # Document is rendered in web_site context
response = self.publish(website.absolute_url_path() + '/' +\ response = self.publish(website.absolute_url_path() + '/' +\
document_reference + '/view', credential) document_reference, credential)
self.assertEquals(response.getHeader('content-type'), self.assertEquals(response.getHeader('content-type'),
'text/html; charset=utf-8') 'text/html; charset=utf-8')
......
...@@ -119,7 +119,7 @@ class TestICal(ERP5TypeTestCase): ...@@ -119,7 +119,7 @@ class TestICal(ERP5TypeTestCase):
self.assertEquals(feed_dict['DTEND'], event.getCreationDate().HTML4().replace('-','').replace(':','')) self.assertEquals(feed_dict['DTEND'], event.getCreationDate().HTML4().replace('-','').replace(':',''))
self.assertEquals(feed_dict['CREATED'], event.getCreationDate().HTML4().replace('-','').replace(':','')) self.assertEquals(feed_dict['CREATED'], event.getCreationDate().HTML4().replace('-','').replace(':',''))
self.assertEquals(feed_dict['LAST-MODIFIED'], event.getModificationDate().HTML4().replace('-','').replace(':','')) self.assertEquals(feed_dict['LAST-MODIFIED'], event.getModificationDate().HTML4().replace('-','').replace(':',''))
self.assertEquals(feed_dict['URL'], event.absolute_url() + '/view') self.assertEquals(feed_dict['URL'], event.absolute_url())
self.assertEquals(feed_dict['UID'], 'uuid%s' % event.getUid()) self.assertEquals(feed_dict['UID'], 'uuid%s' % event.getUid())
# there is no description # there is no description
self.assertFalse('DESCRIPTION' in feed_dict.keys()) self.assertFalse('DESCRIPTION' in feed_dict.keys())
......
...@@ -120,7 +120,7 @@ class TestRSS(ERP5TypeTestCase): ...@@ -120,7 +120,7 @@ class TestRSS(ERP5TypeTestCase):
self.assertEquals(getSubnodeContent(item, 'title'), 'Two') self.assertEquals(getSubnodeContent(item, 'title'), 'Two')
self.assertEquals(getSubnodeContent(item, 'description'), 'Person Two') self.assertEquals(getSubnodeContent(item, 'description'), 'Person Two')
self.assertEquals(getSubnodeContent(item, 'author'), 'seb') self.assertEquals(getSubnodeContent(item, 'author'), 'seb')
expected_link = two.absolute_url() + '/view' expected_link = two.absolute_url()
self.assertEquals(getSubnodeContent(item, 'link'), expected_link) self.assertEquals(getSubnodeContent(item, 'link'), expected_link)
self.assertEquals(len(item.getElementsByTagName('pubDate')), 1) self.assertEquals(len(item.getElementsByTagName('pubDate')), 1)
# is date formatted correctly? # is date formatted correctly?
...@@ -130,7 +130,7 @@ class TestRSS(ERP5TypeTestCase): ...@@ -130,7 +130,7 @@ class TestRSS(ERP5TypeTestCase):
self.assertEquals(getSubnodeContent(item, 'title'), 'One') self.assertEquals(getSubnodeContent(item, 'title'), 'One')
self.assertEquals(getSubnodeContent(item, 'description'), 'Person One') self.assertEquals(getSubnodeContent(item, 'description'), 'Person One')
self.assertEquals(getSubnodeContent(item, 'author'), 'seb') self.assertEquals(getSubnodeContent(item, 'author'), 'seb')
expected_link = one.absolute_url() + '/view' expected_link = one.absolute_url()
self.assertEquals(getSubnodeContent(item, 'link'), expected_link) self.assertEquals(getSubnodeContent(item, 'link'), expected_link)
self.assertEquals(len(item.getElementsByTagName('pubDate')), 1) self.assertEquals(len(item.getElementsByTagName('pubDate')), 1)
# is date formatted correctly? # is date formatted correctly?
...@@ -173,7 +173,7 @@ class TestRSS(ERP5TypeTestCase): ...@@ -173,7 +173,7 @@ class TestRSS(ERP5TypeTestCase):
selection_name='rss_folder_selection')) selection_name='rss_folder_selection'))
listbox_link.manage_tales_xmlrpc( listbox_link.manage_tales_xmlrpc(
dict(default="python: cell.absolute_url() + '/view'")) dict(default="python: cell.absolute_url()"))
one = self.portal.person_module.one one = self.portal.person_module.one
two = self.portal.person_module.two two = self.portal.person_module.two
...@@ -193,7 +193,7 @@ class TestRSS(ERP5TypeTestCase): ...@@ -193,7 +193,7 @@ class TestRSS(ERP5TypeTestCase):
self.assertEquals(getSubnodeContent(item, 'title'), 'Two') self.assertEquals(getSubnodeContent(item, 'title'), 'Two')
self.assertEquals(getSubnodeContent(item, 'description'), 'Person Two') self.assertEquals(getSubnodeContent(item, 'description'), 'Person Two')
self.assertEquals(getSubnodeContent(item, 'author'), 'seb') self.assertEquals(getSubnodeContent(item, 'author'), 'seb')
expected_link = two.absolute_url() + '/view' expected_link = two.absolute_url()
self.assertEquals(getSubnodeContent(item, 'link'), expected_link) self.assertEquals(getSubnodeContent(item, 'link'), expected_link)
self.assertEquals(len(item.getElementsByTagName('pubDate')), 1) self.assertEquals(len(item.getElementsByTagName('pubDate')), 1)
# is date formatted correctly? # is date formatted correctly?
...@@ -203,7 +203,7 @@ class TestRSS(ERP5TypeTestCase): ...@@ -203,7 +203,7 @@ class TestRSS(ERP5TypeTestCase):
self.assertEquals(getSubnodeContent(item, 'title'), 'One') self.assertEquals(getSubnodeContent(item, 'title'), 'One')
self.assertEquals(getSubnodeContent(item, 'description'), 'Person One') self.assertEquals(getSubnodeContent(item, 'description'), 'Person One')
self.assertEquals(getSubnodeContent(item, 'author'), 'seb') self.assertEquals(getSubnodeContent(item, 'author'), 'seb')
expected_link = one.absolute_url() + '/view' expected_link = one.absolute_url()
self.assertEquals(getSubnodeContent(item, 'link'), expected_link) self.assertEquals(getSubnodeContent(item, 'link'), expected_link)
self.assertEquals(len(item.getElementsByTagName('pubDate')), 1) self.assertEquals(len(item.getElementsByTagName('pubDate')), 1)
# is date formatted correctly? # is date formatted correctly?
......
...@@ -391,11 +391,11 @@ def ERP5Site_createModuleScribus(self, ...@@ -391,11 +391,11 @@ def ERP5Site_createModuleScribus(self,
# manage redirection URL # manage redirection URL
if not selection_index: if not selection_index:
redirect_url = '%s/view?%s' % (portal.absolute_url(), redirect_url = '%s?%s' % (portal.absolute_url(),
'portal_status_message=Module+Created.' 'portal_status_message=Module+Created.'
) )
else: else:
redirect_url = '%s/view?selection_index=%s&selection_name=%s&%s' % ( redirect_url = '%s?selection_index=%s&selection_name=%s&%s' % (
portal.absolute_url(), portal.absolute_url(),
selection_index, selection_index,
selection_name, selection_name,
......
...@@ -404,11 +404,11 @@ def ERP5Site_updateModuleScribus(self, ...@@ -404,11 +404,11 @@ def ERP5Site_updateModuleScribus(self,
# manage redirection URL # manage redirection URL
if not selection_index: if not selection_index:
redirect_url = '%s/view?%s' % (portal.absolute_url(), redirect_url = '%s?%s' % (portal.absolute_url(),
'portal_status_message=Module+Updated.' 'portal_status_message=Module+Updated.'
) )
else: else:
redirect_url = '%s/view?selection_index=%s&selection_name=%s&%s' % ( redirect_url = '%s?selection_index=%s&selection_name=%s&%s' % (
portal.absolute_url(), portal.absolute_url(),
selection_index, selection_index,
selection_name, selection_name,
......
...@@ -41,7 +41,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw): ...@@ -41,7 +41,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
def UrlGetter(doc, state_var): def UrlGetter(doc, state_var):
"""returns an url method.""" """returns an url method."""
def get_url(*args, **kw): def get_url(*args, **kw):
return '%s/view?reset:int=1&%s=%s&portal_type=%s' % ( return '%s?reset:int=1&%s=%s&portal_type=%s' % (
self.absolute_url(), state_var, doc.getProperty(state_var), self.absolute_url(), state_var, doc.getProperty(state_var),
doc.getPortalTypeName()) doc.getPortalTypeName())
return get_url return get_url
......
...@@ -2427,12 +2427,11 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine): ...@@ -2427,12 +2427,11 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
error = sys.exc_info()) error = sys.exc_info())
else: else:
try: try:
url = '%s/view' % (
# brain.absolute_url() is slow because it invokes # brain.absolute_url() is slow because it invokes
# _aq_dynamic() every time to get brain.REQUEST, # _aq_dynamic() every time to get brain.REQUEST,
# so we call request.physicalPathToURL() directly # so we call request.physicalPathToURL() directly
# instead of brain.absolute_url(). # instead of brain.absolute_url().
request.physicalPathToURL(brain.getPath()),) url = request.physicalPathToURL(brain.getPath())
params = [] params = []
if ignore_layout: if ignore_layout:
params.append('ignore_layout:int=1') params.append('ignore_layout:int=1')
......
...@@ -2418,7 +2418,7 @@ class Activity: ...@@ -2418,7 +2418,7 @@ class Activity:
if zone == 1: if zone == 1:
# active # active
block_color = self.color block_color = self.color
block_link = '%s/view' % self.object.absolute_url() block_link = self.object.absolute_url()
else: else:
# passive # passive
block_color = '#D1E8FF' block_color = '#D1E8FF'
......
...@@ -104,7 +104,7 @@ class TestPlanningBox(ERP5TypeTestCase): ...@@ -104,7 +104,7 @@ class TestPlanningBox(ERP5TypeTestCase):
for info in bloc.info.values(): for info in bloc.info.values():
self.assertEquals(info.info,'Title 0') self.assertEquals(info.info,'Title 0')
self.assertEquals(info.link , self.assertEquals(info.link ,
'%s/foo_module/0/0/view' % self.getPortal().absolute_url()) '%s/foo_module/0/0' % self.getPortal().absolute_url())
# Check Parent Activities # Check Parent Activities
parent = bloc.parent_activity parent = bloc.parent_activity
for info in parent.info.values(): for info in parent.info.values():
......
...@@ -89,7 +89,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper): ...@@ -89,7 +89,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
""" """
Key authentification PAS plugin which support key authentication in URL. Key authentification PAS plugin which support key authentication in URL.
<ERP5_Root>/web_page_module/1/view?__ac_key=207221200213146153166 <ERP5_Root>/web_page_module/1?__ac_key=207221200213146153166
where value of __ac_key contains (encrypted): where value of __ac_key contains (encrypted):
- proxied (i.e. granting user) username - proxied (i.e. granting user) username
......
...@@ -655,7 +655,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -655,7 +655,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
self.tic() self.tic()
person_module_path = self.getPersonModule().absolute_url(relative=1) person_module_path = self.getPersonModule().absolute_url(relative=1)
response = self.publish('/%s/view' % person_module_path, response = self.publish(person_module_path,
basic='guest:guest') basic='guest:guest')
self.assertEqual(response.getStatus(), 200) self.assertEqual(response.getStatus(), 200)
response = self.publish('/%s/first_last/getFirstName' % person_module_path, response = self.publish('/%s/first_last/getFirstName' % person_module_path,
...@@ -709,7 +709,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -709,7 +709,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
key = erp5_auth_key_plugin.encrypt(reference) key = erp5_auth_key_plugin.encrypt(reference)
self.assertNotEquals(reference, key) self.assertNotEquals(reference, key)
self.assertEquals(reference, erp5_auth_key_plugin.decrypt(key)) self.assertEquals(reference, erp5_auth_key_plugin.decrypt(key))
base_url = '%s/view' %portal.absolute_url(relative=1) base_url = portal.absolute_url(relative=1)
# without key we are Anonymous User so we should be redirected with proper HTML # without key we are Anonymous User so we should be redirected with proper HTML
# status code to login_form # status code to login_form
...@@ -751,7 +751,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -751,7 +751,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
assignment.open() assignment.open()
self.stepTic() self.stepTic()
base_url = '%s/view' %portal.absolute_url(relative=1) base_url = portal.absolute_url(relative=1)
# without key we are Anonymous User so we should be redirected with proper HTML # without key we are Anonymous User so we should be redirected with proper HTML
# status code to login_form # status code to login_form
......
...@@ -1704,6 +1704,7 @@ class Base( CopyContainer, ...@@ -1704,6 +1704,7 @@ class Base( CopyContainer,
""" """
Generic edit Method for all ERP5 object Generic edit Method for all ERP5 object
""" """
self.log('edit:%r' % kw)
return self._edit(REQUEST=REQUEST, force_update=force_update, return self._edit(REQUEST=REQUEST, force_update=force_update,
reindex_object=reindex_object, restricted=1, **kw) reindex_object=reindex_object, restricted=1, **kw)
...@@ -3057,7 +3058,7 @@ class Base( CopyContainer, ...@@ -3057,7 +3058,7 @@ class Base( CopyContainer,
return method(container, **kw) return method(container, **kw)
# XXX this should not happen, unless the Business Template is broken. # XXX this should not happen, unless the Business Template is broken.
return dict(redirect_url=container.absolute_url() + '/view', return dict(redirect_url=container.absolute_url(),
selection_index=None, selection_name=None) selection_index=None, selection_name=None)
# Hash method # Hash method
......
...@@ -136,7 +136,7 @@ class PropertySheetTool(BaseTool): ...@@ -136,7 +136,7 @@ class PropertySheetTool(BaseTool):
if REQUEST is not None: if REQUEST is not None:
return self.REQUEST.RESPONSE.redirect( return self.REQUEST.RESPONSE.redirect(
'%s/view?portal_status_message=' \ '%s?portal_status_message=' \
'Property Sheets successfully imported from filesystem to ZODB.' % \ 'Property Sheets successfully imported from filesystem to ZODB.' % \
self.absolute_url()) self.absolute_url())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment