Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
menu_custom_access
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
menu_custom_access
Commits
c1140374
Commit
c1140374
authored
1 year ago
by
Sakthi Shanmuga Sundaram M
Committed by
Steve Luongo
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3363252
: Resolve array deprecation issue.
parent
41de2ac6
No related branches found
No related tags found
1 merge request
!3
Issue#3363252: Resolve array deprecation issue.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/AccessChecks/RouteAccessChecks.php
+1
-1
1 addition, 1 deletion
src/AccessChecks/RouteAccessChecks.php
with
1 addition
and
1 deletion
src/AccessChecks/RouteAccessChecks.php
+
1
−
1
View file @
c1140374
...
...
@@ -37,7 +37,7 @@ class RouteAccessChecks implements AccessInterface {
$config_route_paths
=
$config
->
get
(
'menu_custom_access.routes'
)
??
''
;
$route_paths
=
preg_split
(
'/\r\n|\r|\n/'
,
$config_route_paths
);
$config_roles
=
$config
->
get
(
'menu_custom_access.roles'
);
$account_has_role
=
array_intersect
(
$account
->
getRoles
(),
$config_roles
);
$account_has_role
=
!
empty
(
$account
->
getRoles
())
?
array_intersect
(
$account
->
getRoles
(),
$config_roles
)
:
$config_roles
;
// Restrict access to paths that are set in config
if
(
in_array
(
$route
->
getPath
(),
$route_paths
))
{
...
...
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