do not display profile info when the idp manage attributes (#3721)

This commit is contained in:
Frédéric Péters 2013-10-26 09:03:04 +02:00
parent ac41f80266
commit 53375a956c
1 changed files with 18 additions and 16 deletions

View File

@ -457,8 +457,9 @@ class MyspaceDirectory(Directory):
user_forms.sort(lambda x,y: cmp(x.receipt_time, y.receipt_time))
profile_links = []
if user_formdef:
profile_links.append('<a href="#my-profile">%s</a>' % _('My Profile'))
if not get_cfg('sp', {}).get('idp-manage-user-attributes', False):
if user_formdef:
profile_links.append('<a href="#my-profile">%s</a>' % _('My Profile'))
if user_forms:
profile_links.append('<a href="#my-forms">%s</a>' % _('My Forms'))
if get_cfg('misc', {}).get('aq-strongbox'):
@ -477,22 +478,23 @@ class MyspaceDirectory(Directory):
' - '.join(profile_links)
'</p>'
if user_formdef:
self._my_profile(user_formdef, user)
if not get_cfg('sp', {}).get('idp-manage-user-attributes', False):
if user_formdef:
self._my_profile(user_formdef, user)
self._index_buttons(user_formdef)
self._index_buttons(user_formdef)
try:
x = PasswordAccount.get_on_index(get_request().user.id, str('user_id'))
except KeyError:
pass
else:
'<p>'
_('You can delete your account freely from the services portal. '
'This action is irreversible; it will destruct your personal '
'datas and destruct the access to your request history.')
' <strong><a href="remove" rel="popup">%s</a></strong>.' % _('Delete My Account')
'</p>'
try:
x = PasswordAccount.get_on_index(get_request().user.id, str('user_id'))
except KeyError:
pass
else:
'<p>'
_('You can delete your account freely from the services portal. '
'This action is irreversible; it will destruct your personal '
'datas and destruct the access to your request history.')
' <strong><a href="remove" rel="popup">%s</a></strong>.' % _('Delete My Account')
'</p>'
options = get_cfg('misc', {}).get('announce_themes')
if options: