Rename private visibility to secret
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-01-26 00:27:49 +02:00
parent c7ae5e3065
commit 5f7c4b1e40
2 changed files with 3 additions and 3 deletions

View File

@@ -127,7 +127,7 @@ class InventoryForm(Form):
owner = FormField(MemberForm, label="Owner")
user = FormField(MemberForm, label="Current User")
usable = BooleanField("Usable")
visibility = SelectField("Visibility", choices=['public', 'unlisted', 'private'], default='unlisted')
visibility = SelectField("Visibility", choices=['public', 'unlisted', 'secret'], default='unlisted')
class HardwareForm(Form):
serial = StringField("Serial Number")
@@ -444,7 +444,7 @@ def view_inventory(slug=None):
can_edit_all = "k-space:inventory:edit" in login_user.get("groups", [])
v = ["public", "unlisted"]
if can_edit_all:
v.append("private")
v.append("secret")
q.update({
"$or": [
{"inventory.visibility": {"$in": v}},