mirror of https://github.com/BOINC/boinc.git
admin page password protection
svn path=/trunk/boinc/; revision=970
This commit is contained in:
parent
f7ee9c58b7
commit
87539d2c27
|
@ -43,6 +43,7 @@
|
|||
$project->project_prefs_php_file = "project_specific_prefs_ap.inc";
|
||||
|
||||
$project->install();
|
||||
$project->http_password("admin","mypass");
|
||||
|
||||
$work = new Work($app);
|
||||
$work->wu_template = "pulse_wu";
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
$work->redundancy = 5;
|
||||
array_push($work->input_files, "03au00ab_20575_00000.wu");
|
||||
$work->install($project);
|
||||
$project->http_password("admin","mypass");
|
||||
|
||||
$project->start_servers();
|
||||
?>
|
||||
|
|
|
@ -415,6 +415,18 @@ class Project {
|
|||
echo "Admin URL: $admin_url\n";
|
||||
}
|
||||
|
||||
// Adds http password protection to the html_ops directory
|
||||
//
|
||||
function http_password($user,$password) {
|
||||
$f = fopen($this->project_dir."/html_ops/.htaccess", "w");
|
||||
fputs($f,"AuthName \"$this->long_name Administration\"\n");
|
||||
fputs($f,"AuthType Basic\n");
|
||||
fputs($f,"AuthUserFile $this->project_dir/html_ops/.htpasswd\n\n");
|
||||
fputs($f,"require valid-user\n");
|
||||
fclose($f);
|
||||
|
||||
PassThru("htpasswd -bc $this->project_dir/html_ops/.htpasswd $user $password");
|
||||
}
|
||||
// moves the master web page to temp
|
||||
// This is used to test exponential backoff on the client side.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue