Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move configuration items to app.php #13

Closed
ctgraham opened this issue Mar 29, 2019 · 5 comments
Closed

Move configuration items to app.php #13

ctgraham opened this issue Mar 29, 2019 · 5 comments

Comments

@ctgraham
Copy link
Member

Any configuration should be part of the config/app.php.

For example:

var $_host="sato1.library.pitt.edu";

public function __construct($host="sato1.library.pitt.edu", $port=515) {

Also:

$username = env('REMOTE_USER', true);

or, remove the option documentation:
* Available options include stripping a scope of the username, and forcing the
* username to lowercase.
* FORCE_LOWERCASE is a boolean
* DROP_SCOPE will take a boolean, string, or array of strings
* true will remove all scopes
* a string or array will remove specific matched scopes
* ```
* public $components = array(
* 'Auth' => array(
* 'authenticate' => array('EnvAuth.Env' => array(
* 'FORCE_LOWERCASE' => true,
* )
* )
* );

For any expected configuration in app.php (since it is not captured in version control), add sample configuration in config/app.default.php

@edensung25
Copy link
Contributor

Should I use PHP define or [cakePHP configuration]? (https://book.cakephp.org/3.0/en/development/configuration.html#bootstrapping-cakephp)
Can I put move those parameters into config/Bootstrap.php?

@ctgraham
Copy link
Member Author

ctgraham commented Apr 1, 2019

These should be done in the cake configuration (config/app.php or an additional included file).

https://book.cakephp.org/3.0/en/development/configuration.html

@ctgraham
Copy link
Member Author

Configuration parameters which are not secure should be set so that the application will work out-of-the-box:

lcsu/config/app.default.php

Lines 387 to 399 in 1a2e45a

// Define user permission
'Managers' => 0,
'Scanners' => 0,
// Define tray statys
'Incompleted' => 0,
'Validate' => 0,
'Completed' => 0,
'Exported' => 0,
// printer configuration
'HOST' => "**",
'PORT' => null,

For example, the constants for Managers and Scanners should be 1 and 2.

@edensung25
Copy link
Contributor

edensung25 commented May 21, 2019

updated in commit 1df1cda and 9ff36da

@ctgraham
Copy link
Member Author

Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants