-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
142 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,7 @@ | ||
Login Control (Roundcube Webmail Plugin) | ||
========== | ||
|
||
======================================== | ||
Plugin to add whitelist and blacklist for login. | ||
|
||
Configuration Options | ||
--------------------- | ||
|
||
Set the following options directly in Roundcube's config file (example): | ||
```php | ||
$config['login_control_mode'] = 'whitelist'; | ||
$config['login_control_list'] = array( | ||
'[email protected]' => array( | ||
'192.0.2.74', | ||
'192.0.2.212', | ||
'198.51.100.12/30', | ||
), | ||
'[email protected]' => array( | ||
'198.51.100.1', | ||
'198.51.100.1', | ||
'198.51.100.12/30', | ||
), | ||
); | ||
``` | ||
|
||
Translation | ||
----------- | ||
|
||
https://www.transifex.com/san4op/roundcube-login-control-plugin/ | ||
Configuration | ||
------------- | ||
Rename config.inc.php.dist to config.inc.php and edit it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ | |
"description": "Plugin to add whitelist and blacklist for login.", | ||
"keywords": ["login", "control", "restriction", "whitelist", "blacklist"], | ||
"homepage": "https://github.com/san4op/roundcube_login_control", | ||
"license": "GPL-3.0+", | ||
"version": "1.2", | ||
"license": "GPL-3.0", | ||
"version": "1.3", | ||
"authors": [ | ||
{ | ||
"name": "Alexander Pushkin", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/san4op", | ||
"homepage": "https://github.com/san4op/", | ||
"role": "Developer" | ||
} | ||
], | ||
|
@@ -29,4 +29,4 @@ | |
"min-version": "1.0.0" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,10 @@ | |
|
||
$config['login_control_mode'] = 'whitelist'; | ||
$config['login_control_list'] = array( | ||
'*' => array( | ||
'10.11.12.0/26', | ||
'172.16.33.0/16', | ||
), | ||
'[email protected]' => array( | ||
'192.0.2.74', | ||
'192.0.2.212', | ||
|
@@ -15,6 +19,9 @@ $config['login_control_list'] = array( | |
'198.51.100.1', | ||
'198.51.100.12/30', | ||
), | ||
'[email protected]' => '192.168.0.0/24', | ||
'[email protected]' => '192.168.0.0/24', | ||
'[email protected]' => '192.168.0.0/24', | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
$labels = array(); | ||
$labels['access_restricted'] = 'Access from this IP address for this user denied!'; | ||
$messages = array(); | ||
$messages['access_restricted'] = 'Access from your IP-address $ipaddr is denied!'; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
$labels = array(); | ||
$labels['access_restricted'] = 'Доступ с данного IP адреса для указанного пользователя запрещен!'; | ||
$messages = array(); | ||
$messages['access_restricted'] = 'Доступ с вашего IP-адреса $ipaddr запрещен!'; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
/** | ||
* Login Control plugin script | ||
* Roundcube Plugin Login Control | ||
* Plugin to add whitelist and blacklist for login. | ||
* | ||
* @version 1.2 | ||
* @version 1.3 | ||
* @author Alexander Pushkin | ||
* @url https://github.com/san4op/roundcube_login_control | ||
* @licence GNU GPLv3 | ||
* @copyright Copyright (c) 2017, Alexander Pushkin | ||
* @link https://github.com/san4op/roundcube_login_control | ||
* @license GNU General Public License, version 3 | ||
*/ | ||
|
||
rcmail.addEventListener('plugin.access_restricted', function(response){ | ||
rcmail.command('logout'); | ||
}); | ||
if (window.rcmail) { | ||
rcmail.addEventListener('plugin.access_restricted', function(response) { | ||
rcmail.command('switch-task', 'logout'); | ||
}); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters