stable

Clone or download

Read-only

[feature] Define background color with REST API

This is part of story #21795 choose project colors in apperance The REST API endpoint /projects/:id/header_background can now deal with color or background images. Color can be set with a JSON body like: { "color": "inca-silver" } Only TLP colors are allowed. You cannot set both parameter at the same time. Change-Id: I16f8c29c22f6b024b74f059718fe7a455b13945a

Modified Files

Name
M src/common/Color/AllowedColorsCollection.php +8 −5 Go to diff View file
A src/common/Project/ProjectBackground/ProjectBackgroundColorName.php +59 −0 Go to diff View file
M src/common/Project/ProjectBackground/ProjectBackgroundDao.php +14 −2 Go to diff View file
M src/common/Project/ProjectBackground/ProjectBackgroundName.php +1 −1 Go to diff View file
M src/common/Project/ProjectBackground/ProjectBackgroundSelection.php +1 −1 Go to diff View file
M src/common/Project/ProjectBackground/ProjectBackgroundUpdater.php +15 −3 Go to diff View file
M src/common/Project/REST/v1/HeaderBackgroundRepresentation.php +26 −5 Go to diff View file
M src/common/Project/REST/v1/ProjectResource.class.php +37 −5 Go to diff View file
M src/db/mysql/database_structure.sql +2 −1 Go to diff View file
A src/db/mysql/updates/2021/202108231506_add_background_color_column.php +39 −0 Go to diff View file
M tests/rest/tests/ProjectTest.php +69 −1 Go to diff View file
A tests/unit/common/Project/ProjectBackground/ProjectBackgroundColorNameTest.php +34 −0 Go to diff View file
M tests/unit/common/Project/ProjectBackground/ProjectBackgroundUpdaterTest.php +13 −3 Go to diff View file
M tests/unit/common/Project/REST/v1/HeaderBackgroundRepresentationTest.php +16 −1 Go to diff View file