Changeset 2047716
- Timestamp:
- 03/10/2019 07:10:54 PM (7 years ago)
- Location:
- ider-login/trunk
- Files:
-
- 5 edited
-
includes/IDER_Admin.php (modified) (1 diff)
-
includes/IDER_Callback.php (modified) (2 diffs)
-
includes/IDER_Server.php (modified) (2 diffs)
-
readme.md (modified) (2 diffs)
-
wp-ider-login-client.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ider-login/trunk/includes/IDER_Admin.php
r1679807 r2047716 139 139 </tr> 140 140 141 <tr valign="top"> 142 143 <th scope="row">Allow Login only to Administrator Users</th> 144 <td> 145 <input type="checkbox" name="<?php echo $this->option_name ?>[ider_admin_mode]" 146 value="1" <?php echo $options['ider_admin_mode'] == 1 ? 'checked="checked"' : ''; ?> /> 147 </td> 148 </tr> 149 141 150 </table> 142 151 -
ider-login/trunk/includes/IDER_Callback.php
r1960496 r2047716 45 45 // TODO: leverage future endpoint to check which side changed the email: local->no access and error msg, remote->update email 46 46 } 47 48 // Store the user roles to check for admins later 49 $user_roles = array(); 50 51 if($user->roles) { 52 $user_roles = $user->roles; 53 } 54 55 if((IDER_Server::get_option('ider_admin_mode') == 1) && !in_array('administrator', $user_roles)) { 56 IDER_Callback::access_denied("Only administrator can log-in via IDer."); 57 } 58 // -- 47 59 48 60 // if new, register first … … 104 116 private static function _update_usermeta($user_id, $userdata) 105 117 { 118 119 if(!$user_id && !$userdata) { 120 return; 121 } 122 106 123 $updated = []; 107 124 -
ider-login/trunk/includes/IDER_Server.php
r1960496 r2047716 24 24 'extra_scopes' => '', 25 25 'login_form_button' => true, 26 'ider_admin_mode' => false, 26 27 'welcome_page' => 'my-account/ider-profile', 27 28 'button_css' => '', … … 94 95 public static function getIDerOpenIdClientIstance() 95 96 { 96 \IDERConnect\IDEROpenIDClient::$IDERLogFile = IDER_PLUGIN_DIR . '/log/ider-connect.log'; 97 98 // Log file placed into uploads folder. 99 $wpUploads = wp_upload_dir(); 100 101 $filename = $wpUploads['basedir'] . '/ider-logs/log/ider-connect.log'; 102 103 if (!file_exists(dirname($filename))) { 104 mkdir(dirname($filename), 0777, true); 105 } 106 107 \IDERConnect\IDEROpenIDClient::$IDERLogFile = $filename; 97 108 98 109 // Override the base URL with the WP one. -
ider-login/trunk/readme.md
r1960529 r2047716 3 3 Requires at least: 4.6 4 4 Tested up to: 4.9.8 5 Stable tag: 1.6. 05 Stable tag: 1.6.1 6 6 License: Apache License, Version 2.0 or later 7 7 License URI: http://directory.fsf.org/wiki/License:Apache2.0 … … 71 71 * Updated OID Client 72 72 * Fixed wrong CSS path 73 74 = 1.6.1 = 75 * Added flag "Allow Login only to Administrator Users" 76 * Update ider-log path. -
ider-login/trunk/wp-ider-login-client.php
r1960496 r2047716 3 3 * Plugin Name: IDer Login 4 4 * Plugin URI: https://www.ider.com 5 * Version: 1.6. 05 * Version: 1.6.1 6 6 * Description: Provides Single Sign On via IDer Identity Server 7 7 * Author: JLM srl … … 34 34 35 35 if (!defined('IDER_CLIENT_VERSION')) { 36 define('IDER_CLIENT_VERSION', '1.6. 0');36 define('IDER_CLIENT_VERSION', '1.6.1'); 37 37 } 38 38
Note: See TracChangeset
for help on using the changeset viewer.