Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
project_browser-3504960
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
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
project_browser-3504960
Commits
dd3fe872
Commit
dd3fe872
authored
8 months ago
by
Adam G-H
Committed by
Chris Wells
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3459288
: Unable to add and install a module via the drupal.org (json:api) source type
parent
23d32e17
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Controller/InstallerController.php
+8
-7
8 additions, 7 deletions
src/Controller/InstallerController.php
with
8 additions
and
7 deletions
src/Controller/InstallerController.php
+
8
−
7
View file @
dd3fe872
...
...
@@ -337,13 +337,14 @@ class InstallerController extends ControllerBase {
* Status message.
*/
public
function
begin
(
Project
$project
):
JsonResponse
{
// @todo Expand to support other plugins in https://drupal.org/i/3312354.
$source
=
$this
->
enabledSourceHandler
->
getCurrentSources
()[
'drupalorg_mockapi'
]
??
NULL
;
if
(
$source
===
NULL
)
{
return
new
JsonResponse
([
'message'
=>
"Cannot download
$project->id
from any available source"
],
500
);
}
if
(
!
$source
->
isProjectSafe
(
$project
))
{
return
new
JsonResponse
([
'message'
=>
"
$project->machineName
is not safe to add because its security coverage has been revoked"
],
500
);
if
(
$project
->
source
===
'drupalorg_mockapi'
)
{
$source
=
$this
->
enabledSourceHandler
->
getCurrentSources
()[
$project
->
source
]
??
NULL
;
if
(
$source
===
NULL
)
{
return
new
JsonResponse
([
'message'
=>
"Cannot download
$project->id
from any available source"
],
500
);
}
if
(
!
$source
->
isProjectSafe
(
$project
))
{
return
new
JsonResponse
([
'message'
=>
"
$project->machineName
is not safe to add because its security coverage has been revoked"
],
500
);
}
}
$stage_available
=
$this
->
installer
->
isAvailable
();
...
...
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