-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Allow to store custom map themes (authenticathed users) #813
Merged
Conversation
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
KO: no error message shown to anonymous userNothing happens when you try to create a new theme via an anonymous user: Request: POST http:https://localhost:8000/qdjango/api/prjtheme/3/foo/
{
"layerstree": [
{
"name": "Geographical group",
"checked": true,
"expanded": true,
"mutually-exclusive": false,
"nodes": [
{
"id": "buildings_2f43dc1d_6725_42d2_a09b_dd446220104a",
"name": "buildings",
"visible": true,
"expanded": true
},
{
"id": "roads_ea006d6f_bd87_4635_aae0_4e9e7842b3f4",
"name": "roads",
"visible": true,
"expanded": true
},
{
"id": "work_areas_f0ecbe28_cbd1_4a38_8a57_ab6da91473fe",
"name": "Work areas",
"visible": true,
"expanded": true
},
{
"id": "type_subtype_caec4a0b_e7c4_4542_b59c_769f2033d6b1",
"name": "Type - Subtype",
"visible": true,
"expanded": true
}
]
},
{
"name": "1:N referencing tables",
"checked": true,
"expanded": true,
"mutually-exclusive": false,
"nodes": [
{
"id": "maintenance_works_f8cbe34a_eebe_4cd1_9c78_5d420ab0af63",
"name": "Maintenance works",
"visible": true,
"expanded": true
},
{
"id": "buildings_rating_3d535fae_fd04_4df6_b6ff_8cbd13df078f",
"name": "Buildings rating",
"visible": true,
"expanded": true
}
]
}
],
"styles": {
"buildings_2f43dc1d_6725_42d2_a09b_dd446220104a": "Categorized",
"roads_ea006d6f_bd87_4635_aae0_4e9e7842b3f4": "default",
"work_areas_f0ecbe28_cbd1_4a38_8a57_ab6da91473fe": "default",
"type_subtype_caec4a0b_e7c4_4542_b59c_769f2033d6b1": "default",
"maintenance_works_f8cbe34a_eebe_4cd1_9c78_5d420ab0af63": "default",
"buildings_rating_3d535fae_fd04_4df6_b6ff_8cbd13df078f": "default"
}
} Response: {
"result": false,
"error": "Field 'id' expected a number but got <django.contrib.auth.models.AnonymousUser object at 0x7f4826a353c0>."
} |
The save of theme by anonymous user it is not allowed and makes no sense, no? |
@wlorenzetti what am I doing wrong? [g3wsdk.info]
|
Ref: 3449515 |
…984d2d2ed831a5ebd3096c3e4484
Fix print atlas: g3w-suite/g3w-client@55352b9
Missing icon custom base layer: g3w-suite/g3w-client@5620947
volterra79
approved these changes
Apr 29, 2024
wlorenzetti
added a commit
that referenced
this pull request
May 6, 2024
* Create model for customer themes. * Implemented CRUD custom theme. * Add constraint. * Typo * Add invalidation of project cache. * Fix test. * Remove CSFR check. * ✨ Client g3w-suite/g3w-client@0e226b2 * 🐛 Client g3w-suite/g3w-client@37adf60 * Add pydantic validation data structure. --------- Co-authored-by: wlorenzetti <[email protected]> Co-authored-by: volterra79 <[email protected]> Co-authored-by: Raruto <[email protected]>
wlorenzetti
added a commit
that referenced
this pull request
May 20, 2024
* Add 'other_info' (userdata) to user form. * ✨ Allow to store custom map themes (authenticathed users) (#813) * Create model for customer themes. * Implemented CRUD custom theme. * Add constraint. * Typo * Add invalidation of project cache. * Fix test. * Remove CSFR check. * ✨ Client g3w-suite/g3w-client@0e226b2 * 🐛 Client g3w-suite/g3w-client@37adf60 * Add pydantic validation data structure. --------- Co-authored-by: wlorenzetti <[email protected]> Co-authored-by: volterra79 <[email protected]> Co-authored-by: Raruto <[email protected]> * 🐛 Fix `SameSite` cookie property. (#793) * Fix `SameSite` cookie property. * Fix samesite value. * Add secure=True for samesite=None --------- Co-authored-by: wlorenzetti <[email protected]> Co-authored-by: Raruto <[email protected]> * ✨ Client g3w-suite/g3w-client@19c1d71 * ⚡ Client g3w-suite/g3w-client@dc02f92 * Fix issue #838 --------- Co-authored-by: wlorenzetti <[email protected]> Co-authored-by: Raruto <[email protected]> Co-authored-by: volterra79 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to: g3w-suite/g3w-client#540
Closes: #812
CRUD actions
Create/Update
POST
/qdjango/api/prjtheme/<project_id>/<theme_name>/
Body request application/json content example:
Response:
Delete
DELETE
/qdjango/api/prjtheme/<project_id>/<theme_name>/
Response:
Project Config
map_themes
structure:Refactoring of the
/config/api/<group_id>/<project_type>/<project_id>
API REST resultmap_themes
property:I.e.: