Changeset:
8291498fe3c0
https://sourceforge.net/p/mrbs/hg-code/ci/8291498fe3c02703c8383f1c567225f2ca2f52cf
Author:
Campbell Morrison <[email protected]>
Date:
Thu Aug 04 15:54:30 2016 +0100
Log message:
Changed the default admin role in the WordPress authentication scheme to be the
WordPress 'Administrator' role. Also added documentation on changes necessary
to the WordPress wp-config.php file to enable authentication cookies to be
shared between MRBS and WordPress.
diffstat:
AUTHENTICATION | 28 ++++++++++++++++++++++++++++
web/systemdefaults.inc.php | 23 +++++++++++++++++++----
2 files changed, 47 insertions(+), 4 deletions(-)
diffs (71 lines):
diff -r 974b9bbcc2e7 -r 8291498fe3c0 AUTHENTICATION
--- a/AUTHENTICATION Thu Aug 04 15:50:51 2016 +0100
+++ b/AUTHENTICATION Thu Aug 04 15:54:30 2016 +0100
@@ -838,6 +838,34 @@
If you want to display a logout link, set in config.inc.php:
$auth['remote_user']['logout_link'] = '/logout/link.html'
+
+
+WordPress Authentication
+------------------------
+
+Set in config.inc.php
+
+$auth['session'] = 'wordpress';
+$auth['type'] = 'wordpress';
+$auth['wordpress']['rel_path'] = '..'; // Path to the WordPress installation
relative to MRBS.
+// List of WordPress roles that have MRBS Admin capabilities. The default is
'Administrator'.
+// However you can define more than one WordPress role that maps to the MRBS
Admin role by using
+// an array. The example below assumes that you have created a new WordPress
role called "MRBS Admin"
+// (probably by using a WordPress plugin) and assigned that role to those
users that you want to be MRBS admins.
+$auth['wordpress']['admin_roles'] = 'Administrator'; // can also be an array,
eg = array('Administrator', 'MRBS Admin');
+
+Then in your WordPress wp-config.php file set:
+
+// Define cookie paths so that login cookies can be shared with MRBS
+$domain_name = 'example.com'; // Set to your domain name
+define('COOKIEPATH', '/');
+define('SITECOOKIEPATH', '/');
+// In the definition below the '.' is necessary for older browsers (see
+// http://php.net/manual/en/function.setcookie.php).
+define('COOKIE_DOMAIN', ".$domain_name");
+define('COOKIEHASH', md5($domain_name));
+
+
External Authentication Programs Configuration
==============================================
diff -r 974b9bbcc2e7 -r 8291498fe3c0 web/systemdefaults.inc.php
--- a/web/systemdefaults.inc.php Thu Aug 04 15:50:51 2016 +0100
+++ b/web/systemdefaults.inc.php Thu Aug 04 15:54:30 2016 +0100
@@ -868,10 +868,25 @@
// 'auth_wordpress' configuration settings
$auth['wordpress']['rel_path'] = '..'; // Path to the WordPress installation
relative to MRBS.
-// List of WordPress roles that have MRBS Admin capabilities. The example
below assumes that you
-// have created a new WordPress role called "MRBS Admin" and assigned that
role to those users that
-// you want to be MRBS admins.
-$auth['wordpress']['admin_roles'] = 'MRBS Admin'; // can also be an array, eg
= array('Administrator', 'MRBS Admin');
+// List of WordPress roles that have MRBS Admin capabilities. The default is
'Administrator'.
+// However you can define more than one WordPress role that maps to the MRBS
Admin role by using
+// an array. The example below assumes that you have created a new WordPress
role called "MRBS Admin"
+// (probably by using a WordPress plugin) and assigned that role to those
users that you want to be MRBS admins.
+$auth['wordpress']['admin_roles'] = 'Administrator'; // can also be an array,
eg = array('Administrator', 'MRBS Admin');
+
+// Note - you are also advised to set the following in your wp-config.php so
that the auth
+// cookies can be shared between MRBS and WordPress:
+
+/*
+// Define cookie paths so that login cookies can be shared with MRBS
+$domain_name = 'example.com'; // Set to your domain name
+define('COOKIEPATH', '/');
+define('SITECOOKIEPATH', '/');
+// In the definition below the '.' is necessary for older browsers (see
+// http://php.net/manual/en/function.setcookie.php).
+define('COOKIE_DOMAIN', ".$domain_name");
+define('COOKIEHASH', md5($domain_name));
+*/
// General settings
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits