mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Protected settings fix (#5229)
* Hide protected setting in settings view * Implement custom serializer for setting value - Return '***' if the setting is protected * Implement to_internal_value * Stringify * Add protected setting to sample plugin * Unit tests for plugin settings API * Update unit test
This commit is contained in:
@ -22,7 +22,9 @@
|
||||
{{ setting.description }}
|
||||
</td>
|
||||
<td>
|
||||
{% if setting.is_bool %}
|
||||
{% if setting.protected %}
|
||||
<span style='color: red;'>***</span> <span class='fas fa-lock icon-red'></span>
|
||||
{% elif setting.is_bool %}
|
||||
{% include "InvenTree/settings/setting_boolean.html" %}
|
||||
{% else %}
|
||||
<div id='setting-{{ setting.pk }}'>
|
||||
|
Reference in New Issue
Block a user