Quote:
Originally Posted by mariosipad
Create for each user a file named config_local.user.php with inside only the $config lines out of config_local.php where each user differs in settings from the others.
For instance what libraries are seen by the user if you use multiple libraries. Etc.
|
Wow...I think I really misunderstood the process! So, to clarify:
1. Essentially copy config_local.php to config_local.monty.php
2. Take out all lines except those that start with $config. I assume the php header (<?php) stays? Remember, not all of are programmers/coders!
3. Modify the new config file if any features are to be eliminated for 'monty', or other users with their own config file
4. Make an entry in the original config_local.php file for each user that will have his own named config file using the format shown?
Thanks. I may be slow, but if you pound my head with a 2x4 long enough, it usually sinks in!
[Edit]
Given you are on the other side of the pond, I suspect you are now asleep...or wish you were!
So, I tried the following. Here is my config_local.php for two users with php authentication:
Code:
<?php
if (!isset($config))
$config = array();
/*
***************************************************
* Please read config_default.php for all possible
* configuration items
***************************************************
*/
/*
* The directory containing calibre's metadata.db file, with sub-directories
* containing all the formats.
* BEWARE : it has to end with a /
*/
$config['calibre_directory'] = array (
"01 - Repository Information" => "/share/CACHEDEV1_DATA/Backups/Calibre_Libraries/01-Repository Information/",
"02 - Fiction eBooks" => "/share/CACHEDEV1_DATA/Backups/Calibre_Libraries/02-Fiction/",
"03 - NonFiction eBooks" => "/share/CACHEDEV1_DATA/Backups/Calibre_Libraries/03-NonFiction/",
"04 - Science Fiction eBooks" => "/share/CACHEDEV1_DATA/Backups/Calibre_Libraries/04-Science Fiction/");
/*
* Catalog's title
*/
$config['cops_title_default'] = "COPS";
/*
* use URL rewriting for downloading of ebook in HTML catalog
* See README for more information
* 1 : enable
* 0 : disable
*/
$config['cops_use_url_rewriting'] = "0";
$config['default_timezone'] = "America/Phoenix";
$config['cops_use_fancyapps'] = "1";
/*
* Enable PHP password protection (You can use if htpasswd is not possible for you)
* If possible prefer htpasswd !
* array( "username" => "xxx", "password" => "secret") : Enable PHP password protection
* NULL : Disable PHP password protection (You can still use htpasswd)
*/
$config['cops_basic_authentication'] = array('username' => 'monty', 'password' => 'mypwd');
$config['cops_basic_authentication'] = array('username' => 'user2', 'password' => 'user2pwd');
Now here is config_local.monty.php:
Code:
<?php
$config['calibre_directory'] = array (
"01 - Repository Information" => "/share/CACHEDEV1_DATA/Backups/Calibre_Libraries/01-Repository Information/",
"02 - Fiction eBooks" => "/share/CACHEDEV1_DATA/Backups/Calibre_Libraries/02-Fiction/",
"03 - NonFiction eBooks" => "/share/CACHEDEV1_DATA/Backups/Calibre_Libraries/03-NonFiction/",
"04 - Science Fiction eBooks" => "/share/CACHEDEV1_DATA/Backups/Calibre_Libraries/04-Science Fiction/");
$config['cops_title_default'] = "MONTY COPS";
$config['cops_use_url_rewriting'] = "0";
$config['default_timezone'] = "America/Phoenix";
$config['cops_use_fancyapps'] = "1";
Per your instructions this 'user' config file has everything removed except the python header and the $config statements.
I modified the cops title setting just so I would know what user I was really looking at once I got in.
The second user file is identical to the monty file except his title setting reflects "USER2".
And while I do get the login screen, it just blinks and blanks out the data I type in.
I have done an apache restart, no change. All php files are set 0666, so assume they do not have to be set executable.
So, I am obviously still missing something on how this should work.