Rename private visibility to secret
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -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}},
|
||||
|
Reference in New Issue
Block a user