Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
domain-3348153
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
domain-3348153
Commits
a767140b
Commit
a767140b
authored
8 years ago
by
Ken Rickard
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request
#266
from agentrickard/265-path
Fixes issue 265 -- no default settings for path exceptions.
parents
5cdefe6d
966668a3
No related branches found
Branches containing commit
Tags
8.x-1.7
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
domain/src/Access/DomainAccessCheck.php
+2
-2
2 additions, 2 deletions
domain/src/Access/DomainAccessCheck.php
domain/src/Form/DomainSettingsForm.php
+1
-1
1 addition, 1 deletion
domain/src/Form/DomainSettingsForm.php
with
3 additions
and
3 deletions
domain/src/Access/DomainAccessCheck.php
+
2
−
2
View file @
a767140b
...
...
@@ -52,11 +52,11 @@ class DomainAccessCheck implements AccessCheckInterface {
* {@inheritdoc}
*/
public
function
checkPath
(
$path
)
{
$allowed_paths
=
$this
->
configFactory
->
get
(
'domain.settings'
)
->
get
(
'login_paths'
);
$allowed_paths
=
$this
->
configFactory
->
get
(
'domain.settings'
)
->
get
(
'login_paths'
,
'/user/login\r\n/user/password'
);
if
(
!
empty
(
$allowed_paths
))
{
$paths
=
preg_split
(
"(
\r\n
?|
\n
)"
,
$allowed_paths
);
}
if
(
in_array
(
$path
,
$paths
))
{
if
(
!
empty
(
$paths
)
&&
in_array
(
$path
,
$paths
))
{
return
FALSE
;
}
return
TRUE
;
...
...
This diff is collapsed.
Click to expand it.
domain/src/Form/DomainSettingsForm.php
+
1
−
1
View file @
a767140b
...
...
@@ -46,7 +46,7 @@ class DomainSettingsForm extends ConfigFormBase {
'#rows'
=>
5
,
'#columns'
=>
40
,
'#title'
=>
$this
->
t
(
'Paths that should be accessible for inactive domains'
),
'#default_value'
=>
$config
->
get
(
'login_paths'
),
'#default_value'
=>
$config
->
get
(
'login_paths'
,
'/user/login\r\n/user/password'
),
'#description'
=>
$this
->
t
(
'Inactive domains are only accessible to users with permission.
Enter any paths that should be accessible, one per line. Normally, only the
login path will be allowed.'
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment