Permalink
Show file tree
Hide file tree
2 changes: 1 addition & 1 deletion
2
plugins/program_management/tests/rest/v1/ProjectResourceTest.php
5 changes: 4 additions & 1 deletion
5
src/common/Project/REST/v1/ProjectCreationDataPOSTProjectBuilder.php
4 changes: 2 additions & 2 deletions
4
src/common/Project/Registration/Template/ProjectTemplateNotActiveException.php
29 changes: 23 additions & 6 deletions
29
src/common/Project/Registration/Template/TemplateFactory.php
49 changes: 42 additions & 7 deletions
49
src/common/Project/Registration/Template/TemplateFromProjectForCreation.php
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
request #26816 Resources of private projects can be accessed by non p…
…roject members Authorizations are not properly verified when creating projects or trackers from projects marked as templates : A classic user should not be able create a project from a private template that he is not a member. Change-Id: Id8b599432923b32551379041a26d2acf0035a59d
- Loading branch information
1 parent
8b709ca
commit 7e221a9
Showing
26 changed files
with
384 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...mon/Project/Registration/Template/InsufficientPermissionToUseCompanyTemplateException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <?php | ||
| /** | ||
| * Copyright (c) Enalean, 2022-Present. All Rights Reserved. | ||
| * | ||
| * This file is a part of Tuleap. | ||
| * | ||
| * Tuleap is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; either version 2 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * Tuleap is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with Tuleap. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| namespace Tuleap\Project\Registration\Template; | ||
|
|
||
| use Project; | ||
| use Project_Creation_Exception; | ||
|
|
||
| final class InsufficientPermissionToUseCompanyTemplateException extends Project_Creation_Exception implements InvalidTemplateException | ||
| { | ||
| public function __construct(private Project $project) | ||
| { | ||
| parent::__construct(sprintf(_("Template %d is not valid: you don't have the permission to the access the project."), $this->project->getId())); | ||
| } | ||
|
|
||
| public function getI18NMessage(): string | ||
| { | ||
| return $this->message; | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project | ||
| unix-name="public-template" full-name="Public Template" description="For template test" access="public"> | ||
| <long-description>A public template test project</long-description> | ||
| <services> | ||
| </services> | ||
| </project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| name,action,comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <users> | ||
| </users> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project | ||
| unix-name="private-template" full-name="Private Template" description="For template test" access="private"> | ||
| <long-description>A private template test project</long-description> | ||
| <ugroups> | ||
| <ugroup name="project_members" description=""> | ||
| <members> | ||
| <member format="username">rest_api_tester_3</member> | ||
| <member format="username">rest_api_tester_5</member> | ||
| </members> | ||
| </ugroup> | ||
| <ugroup name="project_admins" description=""> | ||
| <members> | ||
| <member format="username">rest_api_tester_3</member> | ||
| </members> | ||
| </ugroup> | ||
| </ugroups> | ||
| <services> | ||
| </services> | ||
| </project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| name,action,comment |
Oops, something went wrong.