mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 15:05:40 +00:00
Merge pull request #17 from silverstripe-labs/pulls/basicauth-fix
Fix environment check basic auth tests
This commit is contained in:
commit
7e28448664
@ -60,7 +60,13 @@ class EnvironmentChecker extends RequestHandler {
|
||||
}
|
||||
|
||||
function canAccess($member = null, $permission = "ADMIN") {
|
||||
if(!$member) $member = Member::currentUser();
|
||||
if(!$member) {
|
||||
$member = Member::currentUser();
|
||||
}
|
||||
|
||||
if(!$member) {
|
||||
$member = BasicAuth::requireLogin('Environment Checker', $permission, false);
|
||||
}
|
||||
|
||||
// We allow access to this controller regardless of live-status or ADMIN permission only
|
||||
// if on CLI. Access to this controller is always allowed in "dev-mode", or of the user is ADMIN.
|
||||
|
Loading…
x
Reference in New Issue
Block a user