[BUGFIX] Compare users lets current user disable herself 19/43419/2
authorXavier Perseguers <xavier@typo3.org>
Fri, 18 Sep 2015 11:45:38 +0000 (13:45 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 18 Sep 2015 15:28:32 +0000 (17:28 +0200)
Starting from TYPO3 v7, the Backend module for user management does not let someone
mark herself as disabled (hidden=1).

The user comparison module should respect this behaviour and prevent it as well.

Resolves: #69944
Releases: master
Change-Id: Ie5fe9b8474b2a779f8ce515c3693e84ff1dce758
Reviewed-on: http://review.typo3.org/43419
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Markus Sommer <markussom@posteo.de>
Tested-by: Markus Sommer <markussom@posteo.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/beuser/Resources/Private/Templates/BackendUser/Compare.html

index 2447c9d..3c12022 100644 (file)
                                        <th><f:translate key="disable_compare" /></th>
                                        <f:for each="{compareUserList}" as="compareUser">
                                                <td>
-                                                       <f:if condition="{compareUser.isDisabled} == 1">
-                                                               <f:then>
-                                                                       <a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{compareUser.uid}][disable]=0', redirectUrl: redirectUrl)}" title="{f:translate(key: 'visibility.unhide')}">
-                                                                               <core:icon identifier="actions-edit-unhide" />
-                                                                       </a>
-                                                               </f:then>
-                                                               <f:else>
-                                                                       <a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{compareUser.uid}][disable]=1', redirectUrl: redirectUrl)}" title="{f:translate(key: 'visibility.hide')}">
-                                                                               <core:icon identifier="actions-edit-hide" />
-                                                                       </a>
-                                                               </f:else>
+                                                       <f:if condition="{compareUser.currentlyLoggedIn} == 0">
+                                                               <f:if condition="{compareUser.isDisabled} == 1">
+                                                                       <f:then>
+                                                                               <a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{compareUser.uid}][disable]=0', redirectUrl: redirectUrl)}" title="{f:translate(key: 'visibility.unhide')}">
+                                                                                       <core:icon identifier="actions-edit-unhide" />
+                                                                               </a>
+                                                                       </f:then>
+                                                                       <f:else>
+                                                                               <a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{compareUser.uid}][disable]=1', redirectUrl: redirectUrl)}" title="{f:translate(key: 'visibility.hide')}">
+                                                                                       <core:icon identifier="actions-edit-hide" />
+                                                                               </a>
+                                                                       </f:else>
+                                                               </f:if>
                                                        </f:if>
                                                </td>
                                        </f:for>