SpadarLogin - Version 1.1.1

Version Notes

* Permissions management is separated in admin

Download this release

Release Info

Developer Yury Ksenevich
Extension SpadarLogin
Version 1.1.1
Comparing to
See all releases


Code changes from version 1.1.0 to 1.1.1

app/code/community/Widgento/Core/Block/System/Extensions.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Widgento_Login
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0), a
9
+ * copy of which is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Widgento
13
+ * @package Widgento_Login
14
+ * @author Yury Ksenevich <info@widgento.com>
15
+ * @copyright Copyright (c) 2012-2014 Yury Ksenevich p.e.
16
+ * @license http://www.widgento.com/customer-service Widgento Modules License
17
+ */
18
+
19
+
20
+ ?><?php
21
+
22
+ class Widgento_Core_Block_System_Extensions extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
23
+ protected $_dummyElement;
24
+ protected $fieldRenderer;
25
+ protected $_values;
26
+
27
+ public static $extensionPrefixes = array('Widgento_');
28
+ public static $hiddenExtensions = array('Widgento_Core');
29
+
30
+ public function render(Varien_Data_Form_Element_Abstract $element) {
31
+ $html = $this->_getHeaderHtml($element);
32
+ $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
33
+ sort($modules);
34
+
35
+ foreach ($modules as $moduleName) {
36
+ if (in_array($moduleName, self::$hiddenExtensions)) {
37
+ continue;
38
+ }
39
+
40
+ foreach (self::$extensionPrefixes as $prefix) {
41
+ if (0 === strpos($moduleName, $prefix)) {
42
+ $html.= $this->_getFieldHtml($element, $moduleName);
43
+ continue 2;
44
+ }
45
+ }
46
+ }
47
+
48
+ $html .= $this->_getFooterHtml($element);
49
+
50
+ return $html;
51
+ }
52
+
53
+ protected function getFieldRenderer() {
54
+ if (empty($this->fieldRenderer)) {
55
+ $this->fieldRenderer = Mage::getBlockSingleton('adminhtml/system_config_form_field');
56
+ }
57
+
58
+ return $this->fieldRenderer;
59
+ }
60
+
61
+ protected function _getFieldHtml($fieldset, $moduleCode) {
62
+ $currentVer = Mage::getConfig()->getModuleConfig($moduleCode)->version;
63
+ if (!$currentVer) {
64
+ return false;
65
+ }
66
+
67
+ $field = $fieldset->addField($moduleCode, 'label', array(
68
+ 'name' => 'dummy',
69
+ 'label' => $moduleCode,
70
+ 'value' => $currentVer,
71
+ ))->setRenderer($this->getFieldRenderer());
72
+
73
+ return $field->toHtml();
74
+ }
75
+ }
app/code/community/Widgento/Core/etc/config.xml CHANGED
@@ -23,7 +23,7 @@
23
  <config>
24
  <modules>
25
  <Widgento_Core>
26
- <version>0.1.0</version>
27
  </Widgento_Core>
28
  </modules>
29
 
@@ -91,7 +91,25 @@
91
  </observers>
92
  </controller_action_predispatch>
93
  </events>
94
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  </adminhtml>
96
 
97
  <frontend>
23
  <config>
24
  <modules>
25
  <Widgento_Core>
26
+ <version>0.2.0</version>
27
  </Widgento_Core>
28
  </modules>
29
 
91
  </observers>
92
  </controller_action_predispatch>
93
  </events>
94
+ <acl>
95
+ <resources>
96
+ <admin>
97
+ <children>
98
+ <system>
99
+ <children>
100
+ <config>
101
+ <children>
102
+ <widgentocore>
103
+ <title>Widgento Modules Info</title>
104
+ </widgentocore>
105
+ </children>
106
+ </config>
107
+ </children>
108
+ </system>
109
+ </children>
110
+ </admin>
111
+ </resources>
112
+ </acl>
113
  </adminhtml>
114
 
115
  <frontend>
app/code/community/Widgento/Core/etc/system.xml CHANGED
@@ -27,4 +27,26 @@
27
  <sort_order>199</sort_order>
28
  </widgento>
29
  </tabs>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  </config>
27
  <sort_order>199</sort_order>
28
  </widgento>
29
  </tabs>
30
+ <sections>
31
+ <widgentocore translate="label" module="widgentocore">
32
+ <label>Modules Info</label>
33
+ <tab>widgento</tab>
34
+ <frontend_type>text</frontend_type>
35
+ <sort_order>110</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ <groups>
40
+ <extensions translate="label">
41
+ <label>Installed Extensions</label>
42
+ <frontend_type>text</frontend_type>
43
+ <frontend_model>widgentocore/system_extensions</frontend_model>
44
+ <sort_order>40</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ </extensions>
49
+ </groups>
50
+ </widgentocore>
51
+ </sections>
52
  </config>
app/code/community/Widgento/Login/Helper/Button.php CHANGED
@@ -61,7 +61,7 @@ class Widgento_Login_Helper_Button extends Mage_Core_Helper_Abstract
61
  'customer_id' => $this->_getCustomerId(),
62
  ));
63
 
64
- if (!$adminSession->isAllowed('system/config/widgentologin') || !Mage::helper('widgentologin')->getCustomerStoreId($this->_getCustomerId()) || $transport->getDisable())
65
  {
66
  return 'hidden';
67
  }
61
  'customer_id' => $this->_getCustomerId(),
62
  ));
63
 
64
+ if (!$adminSession->isAllowed('customer/widgentologin') || !Mage::helper('widgentologin')->getCustomerStoreId($this->_getCustomerId()) || $transport->getDisable())
65
  {
66
  return 'hidden';
67
  }
app/code/community/Widgento/Login/controllers/Adminhtml/LogController.php CHANGED
@@ -39,7 +39,7 @@ class Widgento_Login_Adminhtml_LogController extends Mage_Adminhtml_Controller_A
39
 
40
  public function _isAllowed()
41
  {
42
- return Mage::getSingleton('admin/session')->isAllowed('system/config/widgentologin');
43
  }
44
 
45
  public function gridAction()
39
 
40
  public function _isAllowed()
41
  {
42
+ return Mage::getSingleton('admin/session')->isAllowed('customer/widgentologin/log');
43
  }
44
 
45
  public function gridAction()
app/code/community/Widgento/Login/etc/config.xml CHANGED
@@ -23,7 +23,7 @@
23
  <config>
24
  <modules>
25
  <Widgento_Login>
26
- <version>1.1.0</version>
27
  </Widgento_Login>
28
  </modules>
29
 
@@ -133,6 +133,18 @@
133
  </config>
134
  </children>
135
  </system>
 
 
 
 
 
 
 
 
 
 
 
 
136
  </children>
137
  </admin>
138
  </resources>
23
  <config>
24
  <modules>
25
  <Widgento_Login>
26
+ <version>1.1.1</version>
27
  </Widgento_Login>
28
  </modules>
29
 
133
  </config>
134
  </children>
135
  </system>
136
+ <customer>
137
+ <children>
138
+ <widgentologin>
139
+ <title>Login as Customer</title>
140
+ <children>
141
+ <log>
142
+ <title>Login as Customer Logs</title>
143
+ </log>
144
+ </children>
145
+ </widgentologin>
146
+ </children>
147
+ </customer>
148
  </children>
149
  </admin>
150
  </resources>
package.xml CHANGED
@@ -1,21 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SpadarLogin</name>
4
- <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.widgento.com/customer-service">Widgento Modules License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Login as Customer</summary>
10
  <description>Allows admin users login as customers from admin</description>
11
- <notes>* Magento CE 1.9 and EE 1.14 compatibility&#xD;
12
- * New feature to track admin logins&#xD;
13
- * Added compatibility observers for thirtparty module developers&#xD;
14
- ! Fixed the issue with old session data merging </notes>
15
  <authors><author><name>Yury Ksenevich</name><user>widgento</user><email>info@widgento.com</email></author><author><name>Yury Ksenevich</name><user>spadar</user><email>yury@spadar.com</email></author></authors>
16
- <date>2014-07-29</date>
17
- <time>07:07:57</time>
18
- <contents><target name="magecommunity"><dir name="Widgento"><dir name="Core"><dir name="Helper"><file name="Data.php" hash="929c2542f8802eeac8e8a47d9827838c"/></dir><dir name="Model"><file name="Feed.php" hash="f1a68ca6ddfe11d01411a865d86b25d2"/><dir name="Uninstall"><file name="Abstract.php" hash="d46e17bb889b357aa3d6d14f3dd4ead2"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RewriteController.php" hash="1fdbac4642f60280d12cd8e9e4b7e899"/></dir></dir><dir name="etc"><file name="config.xml" hash="aa14cf3963a2939d79340d6fdff7e4df"/><file name="manifest.xml" hash="0846a6969c50351de5b2cfccc3b56048"/><file name="system.xml" hash="e2feaa57c405886ffde056205b896265"/></dir></dir><dir name="Login"><dir name="Block"><dir name="Adminhtml"><dir name="Log"><file name="Grid.php" hash="5ec0afb70619579ec70cf4bfc8f24ff6"/></dir><file name="Log.php" hash="f6fa683690849091eeb4d9cd8f255789"/></dir></dir><dir name="Helper"><file name="Button.php" hash="bdc1e48d706e266f8ea9d358829c6994"/><file name="Data.php" hash="7f41ffd999ff2c0392690042bcd8f0af"/></dir><dir name="Model"><file name="Login.php" hash="4f490d081c6e291ed27be8dd35dbfab2"/><dir name="Mysql4"><dir name="Login"><file name="Collection.php" hash="ad03643e70379020bb220e84af09d1f3"/></dir><file name="Login.php" hash="c23264a72bc5715fb74faac22d65351f"/></dir><file name="Uninstall.php" hash="3098d55d3d0e395d098c7b005d0ff427"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="c2caf941285ab8417f4ac0b1dff53579"/><file name="LogController.php" hash="a99b851989d5d37500b245d1de88fcf5"/></dir><file name="IndexController.php" hash="c183c3ffb1bd8497c80ab33b366c2000"/></dir><dir name="etc"><file name="config.xml" hash="f6ae0a2d95840a34f5bf345544d9ecf0"/><file name="manifest.xml" hash="50e9b7620ec562998ed3543ac623ebe7"/><file name="system.xml" hash="cefce2fcf4556519e38229b48d00b6cd"/></dir><dir name="sql"><dir name="widgento_login_setup"><file name="mysql4-install-1.1.0.php" hash="dfcbc452bb4217fcd83f6bc13945e931"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Widgento_Core.xml" hash="68db7487c41f68d1dc90ee28fbec2ed1"/><file name="Widgento_Login.xml" hash="1f47610e037a802e5f47c6ea2f3038e2"/><file name="Spadar_Login.xml" hash="729856df84b4c7440d669588c6874bc0"/></dir></target><target name="mage"><dir name="shell"><file name="widgento_uninstall.php" hash="cdd962b57f486c3e34a9344083ccec22"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Widgento_Login.csv" hash="2b5e63cebdaca03c458737d7ee2c7a1a"/></dir><dir name="en_US"><file name="Widgento_Login.csv" hash="58e5ec2b05b5b446c636c86fae8be482"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="widgentologin.xml" hash="777517182a707510d8aebbbb70b1ed13"/></dir></dir></dir></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.4</min><max/></package></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SpadarLogin</name>
4
+ <version>1.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.widgento.com/customer-service">Widgento Modules License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Login as Customer</summary>
10
  <description>Allows admin users login as customers from admin</description>
11
+ <notes>* Permissions management is separated in admin </notes>
 
 
 
12
  <authors><author><name>Yury Ksenevich</name><user>widgento</user><email>info@widgento.com</email></author><author><name>Yury Ksenevich</name><user>spadar</user><email>yury@spadar.com</email></author></authors>
13
+ <date>2014-12-29</date>
14
+ <time>19:59:44</time>
15
+ <contents><target name="magecommunity"><dir name="Widgento"><dir name="Core"><dir name="Block"><dir name="System"><file name="Extensions.php" hash="513dbfc9bd02fc15ebadd1d8ee6b4a69"/></dir></dir><dir name="Helper"><file name="Data.php" hash="929c2542f8802eeac8e8a47d9827838c"/></dir><dir name="Model"><file name="Feed.php" hash="f1a68ca6ddfe11d01411a865d86b25d2"/><dir name="Uninstall"><file name="Abstract.php" hash="d46e17bb889b357aa3d6d14f3dd4ead2"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RewriteController.php" hash="1fdbac4642f60280d12cd8e9e4b7e899"/></dir></dir><dir name="etc"><file name="config.xml" hash="ce069dc6dcc2d187459b0a2b8625887c"/><file name="manifest.xml" hash="0846a6969c50351de5b2cfccc3b56048"/><file name="system.xml" hash="189ed9608c72cca77e1e861effe9dbb6"/></dir></dir><dir name="Login"><dir name="Block"><dir name="Adminhtml"><dir name="Log"><file name="Grid.php" hash="5ec0afb70619579ec70cf4bfc8f24ff6"/></dir><file name="Log.php" hash="f6fa683690849091eeb4d9cd8f255789"/></dir></dir><dir name="Helper"><file name="Button.php" hash="fc30cb8cf5c268cebdd63e9394f09359"/><file name="Data.php" hash="7f41ffd999ff2c0392690042bcd8f0af"/></dir><dir name="Model"><file name="Login.php" hash="4f490d081c6e291ed27be8dd35dbfab2"/><dir name="Mysql4"><dir name="Login"><file name="Collection.php" hash="ad03643e70379020bb220e84af09d1f3"/></dir><file name="Login.php" hash="c23264a72bc5715fb74faac22d65351f"/></dir><file name="Uninstall.php" hash="3098d55d3d0e395d098c7b005d0ff427"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="c2caf941285ab8417f4ac0b1dff53579"/><file name="LogController.php" hash="481678feb7644f4b522f220c590905b9"/></dir><file name="IndexController.php" hash="c183c3ffb1bd8497c80ab33b366c2000"/></dir><dir name="etc"><file name="config.xml" hash="1e99f4d7e2e01c54b504ce16cef03f77"/><file name="manifest.xml" hash="50e9b7620ec562998ed3543ac623ebe7"/><file name="system.xml" hash="cefce2fcf4556519e38229b48d00b6cd"/></dir><dir name="sql"><dir name="widgento_login_setup"><file name="mysql4-install-1.1.0.php" hash="dfcbc452bb4217fcd83f6bc13945e931"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Widgento_Core.xml" hash="68db7487c41f68d1dc90ee28fbec2ed1"/><file name="Widgento_Login.xml" hash="1f47610e037a802e5f47c6ea2f3038e2"/><file name="Spadar_Login.xml" hash="729856df84b4c7440d669588c6874bc0"/></dir></target><target name="mage"><dir name="shell"><file name="widgento_uninstall.php" hash="cdd962b57f486c3e34a9344083ccec22"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Widgento_Login.csv" hash="2b5e63cebdaca03c458737d7ee2c7a1a"/></dir><dir name="en_US"><file name="Widgento_Login.csv" hash="58e5ec2b05b5b446c636c86fae8be482"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="widgentologin.xml" hash="777517182a707510d8aebbbb70b1ed13"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.4</min><max/></package></required></dependencies>
18
  </package>