Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
d8a2574a
Unverified
Commit
d8a2574a
authored
2 years ago
by
Eileen McNaughton
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #25810 from eileenmcnaughton/import_subscriber
#4184
Fix Import over-authorization
parents
ff32212b
250b13bc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ext/civiimport/Civi/Api4/Event/Subscriber/ImportSubscriber.php
+1
-1
1 addition, 1 deletion
...iviimport/Civi/Api4/Event/Subscriber/ImportSubscriber.php
with
1 addition
and
1 deletion
ext/civiimport/Civi/Api4/Event/Subscriber/ImportSubscriber.php
+
1
−
1
View file @
d8a2574a
...
...
@@ -104,7 +104,7 @@ class ImportSubscriber extends AutoService implements EventSubscriberInterface {
public
function
onApiAuthorize
(
AuthorizeEvent
$event
):
void
{
$apiRequest
=
$event
->
getApiRequest
();
$entity
=
$apiRequest
[
'entity'
];
if
(
strpos
(
$entity
,
'Import_'
)
===
0
)
{
if
(
strpos
(
$entity
,
'Import_'
)
===
0
&&
!
in_array
(
$event
->
getActionName
(),
[
'getFields'
,
'getActions'
,
'checkAccess'
],
TRUE
)
)
{
$userJobID
=
(
int
)
(
str_replace
(
'Import_'
,
''
,
$entity
));
if
(
!
UserJob
::
get
(
TRUE
)
->
addWhere
(
'id'
,
'='
,
$userJobID
)
->
selectRowCount
()
->
execute
()
->
count
())
{
throw
new
UnauthorizedException
(
'Import access not permitted'
);
...
...
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