X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fprofile%2Fprofile.tpl;h=967bf7e04962ca7a5edfcb764b59c20825dbb2b3;hb=43c653a10a1c75be317696bf4c66db555606d39e;hp=d02d153dd2e45b961231767ce3c421ebdafc1552;hpb=12ddbc2037b16496dfb9d91c4f7091850146fcde;p=platal.git
diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl
index d02d153..967bf7e 100644
--- a/templates/profile/profile.tpl
+++ b/templates/profile/profile.tpl
@@ -1,6 +1,6 @@
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2010 Polytechnique.org *}
+{* Copyright (C) 2003-2011 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
@@ -106,10 +106,12 @@ function chgMainWinLoc(strPage)
{icon name=wrench title="administrer user"}
{/if}
- {if $owner->login() eq $smarty.session.hruid}
+ {if $smarty.session.user->isMyProfile($profile)}
{icon name="user_edit" title="Modifier ma fiche"}
- {elseif hasPerm('edit_directory')}
- {icon name="user_edit" title="Modifier cette fiche"}
+ {elseif hasPerm('admin') || $smarty.session.user->canEdit($profile)}
+
+ {icon name=user_edit title="modifier la fiche"}
+
{/if}
{/if}