Oleg Komarov
e3ca4daed7
See #166 This PR changes validation rules for `permissions` field of the manifest. When present, the field is expected to represent a dictionary of {slug: reason} key-value pairs. Previous format was a list of [slug]. Validation for these reason strings ensures that a reason is a non-empty string, no longer than 64 characters, and doesn't end in punctuation. No visible changes on the website are done in this PR. `/api/v1/extensions/` endpoint now returns `permissions` field as a dict {slug: reason}, where reason is taken from `VersionPermission.help` field managed via admin. The new values are stored in metadata, but the `Version.permissions` model is not changing yet, and thus it doesn't store the reason values. We can decide to keep the model as is and lookup the reasons from `Version.file.metadata`, but this needs more thought. Reviewed-on: #168 Reviewed-by: Anna Sirota <annasirota@noreply.localhost> |
||
---|---|---|
.. | ||
addon-with-permissions.zip | ||
addon-without-dir.zip | ||
amaranth-1.0.8.zip | ||
asset_bundle-0.1.0.zip | ||
blender_gis-2.2.8.zip | ||
edit_breakdown-0.1.0.zip | ||
empty.txt | ||
empty.zip | ||
invalid-addon-dir-no-init.zip | ||
invalid-addon-no-init.zip | ||
invalid-archive.zip | ||
invalid-manifest-path.zip | ||
invalid-manifest-toml.zip | ||
invalid-missing-wheels.zip | ||
invalid-no-manifest.zip | ||
invalid-theme-multiple-xmls.zip | ||
keymap.zip | ||
test_featured_image_0001.png | ||
test_icon_0001.png | ||
test_preview_image_0001.gif | ||
test_preview_image_0001.png | ||
test_preview_image_0001.tif | ||
test_preview_image_0001.webp | ||
test_preview_image_0002.png | ||
test_preview_image_0002.tif | ||
test_preview_image_0003.png | ||
test_preview_image_renamed_gif.png | ||
theme.zip |