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> |
||
---|---|---|
.. | ||
migrations | ||
static/files/admin | ||
templates/files | ||
tests | ||
__init__.py | ||
admin.py | ||
apps.py | ||
forms.py | ||
models.py | ||
signals.py | ||
tasks.py | ||
theme.xsd | ||
utils.py | ||
validators.py |