Version Notes
Removed overwritten tabs block. Using now an observer event.
Download this release
Release Info
Developer | netz98 new media GmbH |
Extension | N98_Yubikey |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
app/code/community/N98/Yubikey/Block/Adminhtml/Permission/User/Edit/Tabs.php
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* netz98 magento module
|
4 |
-
*
|
5 |
-
* LICENSE
|
6 |
-
*
|
7 |
-
* Copyright © 2012.
|
8 |
-
* netz98 new media GmbH. Alle Rechte vorbehalten.
|
9 |
-
*
|
10 |
-
* Die Nutzung und Weiterverbreitung dieser Software in kompilierter oder nichtkompilierter Form, mit oder ohne Veränderung, ist unter den folgenden Bedingungen zulässig:
|
11 |
-
*
|
12 |
-
* 1. Weiterverbreitete kompilierte oder nichtkompilierte Exemplare müssen das obere Copyright, die Liste der Bedingungen und den folgenden Verzicht im Sourcecode enthalten.
|
13 |
-
* 2. Alle Werbematerialien, die sich auf die Eigenschaften oder die Benutzung der Software beziehen, müssen die folgende Bemerkung enthalten: "Dieses Produkt enthält Software, die von der netz98 new media GmbH entwickelt wurde."
|
14 |
-
* 3. Der Name der netz98 new media GmbH darf nicht ohne vorherige ausdrückliche, schriftliche Genehmigung zur Kennzeichnung oder Bewerbung von Produkten, die von dieser Software abgeleitet wurden, verwendet werden.
|
15 |
-
* 4. Es ist Lizenznehmern der netz98 new media GmbH nur dann erlaubt die veränderte Software zu verbreiten, wenn jene zu den Bedingungen einer Lizenz, die eine Copyleft-Klausel enthält, lizenziert wird.
|
16 |
-
*
|
17 |
-
* Diese Software wird von der netz98 new media GmbH ohne jegliche spezielle oder implizierte Garantien zur Verfügung gestellt. So übernimmt die netz98 new media GmbH keine Gewährleistung für die Verwendbarkeit der Software für einen speziellen Zweck oder die generelle Nutzbarkeit. Unter keinen Umständen ist netz98 haftbar für indirekte oder direkte Schäden, die aus der Verwendung der Software resultieren. Jegliche Schadensersatzansprüche sind ausgeschlossen.
|
18 |
-
*
|
19 |
-
*
|
20 |
-
* Copyright © 2012
|
21 |
-
* netz98 new media GmbH. All rights reserved.
|
22 |
-
*
|
23 |
-
* The use and redistribution of this software, either compiled or uncompiled, with or without modifications are permitted provided that the following conditions are met:
|
24 |
-
*
|
25 |
-
* 1. Redistributions of compiled or uncompiled source must contain the above copyright notice, this list of the conditions and the following disclaimer:
|
26 |
-
* 2. All advertising materials mentioning features or use of this software must display the following acknowledgement: “This product includes software developed by the netz98 new media GmbH, Mainz.”
|
27 |
-
* 3. The name of the netz98 new media GmbH may not be used to endorse or promote products derived from this software without specific prior written permission.
|
28 |
-
* 4. License holders of the netz98 new media GmbH are only permitted to redistribute altered software, if this is licensed under conditions that contain a copyleft-clause.
|
29 |
-
* This software is provided by the netz98 new media GmbH without any express or implied warranties. netz98 is under no condition liable for the functional capability of this software for a certain purpose or the general usability. netz98 is under no condition liable for any direct or indirect damages resulting from the use of the software. Liability and Claims for damages of any kind are excluded.
|
30 |
-
*
|
31 |
-
* @copyright Copyright (c) 2012 netz98 new media GmbH (http://www.netz98.de)
|
32 |
-
* @author netz98 new media GmbH <info@netz98.de>
|
33 |
-
* @category N98
|
34 |
-
* @package N98_Yubikey
|
35 |
-
*/
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Adds the yubikey tab to form.
|
39 |
-
*/
|
40 |
-
class N98_Yubikey_Block_Adminhtml_Permission_User_Edit_Tabs extends Mage_Adminhtml_Block_Permissions_User_Edit_Tabs
|
41 |
-
{
|
42 |
-
/**
|
43 |
-
* @return Mage_Core_Block_Abstract
|
44 |
-
*/
|
45 |
-
protected function _beforeToHtml()
|
46 |
-
{
|
47 |
-
$this->addTab('yubikey_section', array(
|
48 |
-
'label' => Mage::helper('n98_yubikey')->__('Yubikey setup'),
|
49 |
-
'title' => Mage::helper('n98_yubikey')->__('Yubikey setup'),
|
50 |
-
'content' => $this->getLayout()->createBlock('n98_yubikey/adminhtml_permission_user_edit_tab_yubikey')->toHtml(),
|
51 |
-
'active' => true
|
52 |
-
));
|
53 |
-
return parent::_beforeToHtml();
|
54 |
-
}
|
55 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/N98/Yubikey/Model/Observer.php
CHANGED
@@ -43,7 +43,7 @@ class N98_Yubikey_Model_Observer
|
|
43 |
/**
|
44 |
* @param Varien_Event_Observer $observer
|
45 |
*/
|
46 |
-
public function controllerActionPredispatch($observer)
|
47 |
{
|
48 |
$session = Mage::getSingleton('admin/session');
|
49 |
/* @var $session Mage_Admin_Model_Session */
|
@@ -99,4 +99,23 @@ class N98_Yubikey_Model_Observer
|
|
99 |
$message = date('c') . "\n OTP: " . $otp . ' | Status: ' . $status;
|
100 |
Mage::log($message, Zend_Log::DEBUG, 'yubikey.log');
|
101 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
43 |
/**
|
44 |
* @param Varien_Event_Observer $observer
|
45 |
*/
|
46 |
+
public function controllerActionPredispatch(Varien_Event_Observer $observer)
|
47 |
{
|
48 |
$session = Mage::getSingleton('admin/session');
|
49 |
/* @var $session Mage_Admin_Model_Session */
|
99 |
$message = date('c') . "\n OTP: " . $otp . ' | Status: ' . $status;
|
100 |
Mage::log($message, Zend_Log::DEBUG, 'yubikey.log');
|
101 |
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @param Varien_Event_Observer $observer
|
105 |
+
*/
|
106 |
+
public function addYubikeyTabToUserPermissionForm(Varien_Event_Observer $observer)
|
107 |
+
{
|
108 |
+
$block = $observer->getBlock();
|
109 |
+
/* @var $block Mage_Adminhtml_Block_Permissions_User_Edit_Tabs */
|
110 |
+
|
111 |
+
if ($block instanceof Mage_Adminhtml_Block_Permissions_User_Edit_Tabs) {
|
112 |
+
$block->addTabAfter('yubikey_section', array(
|
113 |
+
'label' => Mage::helper('n98_yubikey')->__('Yubikey setup'),
|
114 |
+
'title' => Mage::helper('n98_yubikey')->__('Yubikey setup'),
|
115 |
+
'content' => $block->getLayout()->createBlock('n98_yubikey/adminhtml_permission_user_edit_tab_yubikey')->toHtml(),
|
116 |
+
'active' => true
|
117 |
+
), 'roles_section');
|
118 |
+
|
119 |
+
}
|
120 |
+
}
|
121 |
}
|
app/code/community/N98/Yubikey/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<N98_Yubikey>
|
5 |
-
<version>1.0.
|
6 |
</N98_Yubikey>
|
7 |
</modules>
|
8 |
<admin>
|
@@ -35,6 +35,14 @@
|
|
35 |
</n98_yubikey>
|
36 |
</observers>
|
37 |
</controller_action_predispatch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
</events>
|
39 |
</adminhtml>
|
40 |
<global>
|
@@ -42,11 +50,6 @@
|
|
42 |
<n98_yubikey>
|
43 |
<class>N98_Yubikey_Block</class>
|
44 |
</n98_yubikey>
|
45 |
-
<adminhtml>
|
46 |
-
<rewrite>
|
47 |
-
<permissions_user_edit_tabs>N98_Yubikey_Block_Adminhtml_Permission_User_Edit_Tabs</permissions_user_edit_tabs>
|
48 |
-
</rewrite>
|
49 |
-
</adminhtml>
|
50 |
</blocks>
|
51 |
<models>
|
52 |
<n98_yubikey>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<N98_Yubikey>
|
5 |
+
<version>1.0.1</version>
|
6 |
</N98_Yubikey>
|
7 |
</modules>
|
8 |
<admin>
|
35 |
</n98_yubikey>
|
36 |
</observers>
|
37 |
</controller_action_predispatch>
|
38 |
+
<core_block_abstract_prepare_layout_after>
|
39 |
+
<observers>
|
40 |
+
<n98_yubikey>
|
41 |
+
<class>n98_yubikey/observer</class>
|
42 |
+
<method>addYubikeyTabToUserPermissionForm</method>
|
43 |
+
</n98_yubikey>
|
44 |
+
</observers>
|
45 |
+
</core_block_abstract_prepare_layout_after>
|
46 |
</events>
|
47 |
</adminhtml>
|
48 |
<global>
|
50 |
<n98_yubikey>
|
51 |
<class>N98_Yubikey_Block</class>
|
52 |
</n98_yubikey>
|
|
|
|
|
|
|
|
|
|
|
53 |
</blocks>
|
54 |
<models>
|
55 |
<n98_yubikey>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>N98_Yubikey</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Enables yubikey support to admin login.</summary>
|
10 |
<description>Enables yubikey support to admin login.</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>netz98 new media GmbH</name><user>netz98magento</user><email>magento@netz98.de</email></author></authors>
|
13 |
<date>2012-02-19</date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="N98"><dir name="Yubikey"><dir name="Block"><dir name="Adminhtml"><dir name="Permission"><dir name="User"><dir name="Edit"><dir name="Tab"><file name="Yubikey.php" hash="51e0b73f433833b91ddf1723145dfc8d"/></dir
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>N98_Yubikey</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Enables yubikey support to admin login.</summary>
|
10 |
<description>Enables yubikey support to admin login.</description>
|
11 |
+
<notes>Removed overwritten tabs block. Using now an observer event.</notes>
|
12 |
<authors><author><name>netz98 new media GmbH</name><user>netz98magento</user><email>magento@netz98.de</email></author></authors>
|
13 |
<date>2012-02-19</date>
|
14 |
+
<time>21:47:17</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="N98"><dir name="Yubikey"><dir name="Block"><dir name="Adminhtml"><dir name="Permission"><dir name="User"><dir name="Edit"><dir name="Tab"><file name="Yubikey.php" hash="51e0b73f433833b91ddf1723145dfc8d"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4ce4b0011885e1bbd497dafd5107dad2"/></dir><dir name="Model"><file name="Auth.php" hash="eb8a8d8197183ca9e0ebb8426188bff3"/><file name="Config.php" hash="55eebbebbe9fd548879e43bf22413c83"/><file name="Observer.php" hash="da7264cc5ac392ed7ea83be661262c50"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="YubikeyController.php" hash="bb985baa3fd4bcd73bc5630a669df668"/></dir></dir><dir name="etc"><file name="config.xml" hash="6a3fff10b405865d088ed7a29e223466"/><file name="system.xml" hash="a2d81528a5440a8ed4b0997e97e1196b"/></dir><dir name="sql"><dir name="n98_yubikey_setup"><file name="install-1.0.0.php" hash="e29fde7500032491d3692cdbd5ab0766"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="n98_yubikey.xml" hash="ba0ac4c7b3ab434e7e05452384298034"/></dir><dir name="template"><dir name="n98_yubikey"><file name="login.phtml" hash="275b2dd71d947d19173208c0a813ad0f"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="N98_Yubikey.csv" hash="8e503219cc5fe885851cd5ae2defe7ec"/></dir><dir name="en_US"><file name="N98_Yubikey.csv" hash="7691953b0a32fa0a960de1aa3eb8ca39"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="n98_yubikey"><file name="yubiright_16x16.gif" hash="9346ef9d8d719916d92c15a785f8b48a"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="N98_Yubikey.xml" hash="9c73d2a127559d9a8cd73d055c1eb22c"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|