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:
		@@ -7,5 +7,5 @@
 | 
				
			|||||||
|Group|Description|
 | 
					|Group|Description|
 | 
				
			||||||
|-----|-----------|
 | 
					|-----|-----------|
 | 
				
			||||||
|k-space:inventory:audit|Update last time item information confirmed to be accurate|
 | 
					|k-space:inventory:audit|Update last time item information confirmed to be accurate|
 | 
				
			||||||
|k-space:inventory:edit|Edit all items that are not keys. Browse items with private visibility.|
 | 
					|k-space:inventory:edit|Edit all items that are not keys. Browse items with secret visibility.|
 | 
				
			||||||
|k-space:inventory:keys|Edit keys|
 | 
					|k-space:inventory:keys|Edit keys|
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -127,7 +127,7 @@ class InventoryForm(Form):
 | 
				
			|||||||
    owner = FormField(MemberForm, label="Owner")
 | 
					    owner = FormField(MemberForm, label="Owner")
 | 
				
			||||||
    user = FormField(MemberForm, label="Current User")
 | 
					    user = FormField(MemberForm, label="Current User")
 | 
				
			||||||
    usable = BooleanField("Usable")
 | 
					    usable = BooleanField("Usable")
 | 
				
			||||||
    visibility = SelectField("Visibility", choices=['public', 'unlisted', 'private'], default='unlisted')
 | 
					    visibility = SelectField("Visibility", choices=['public', 'unlisted', 'secret'], default='unlisted')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class HardwareForm(Form):
 | 
					class HardwareForm(Form):
 | 
				
			||||||
    serial = StringField("Serial Number")
 | 
					    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", [])
 | 
					        can_edit_all = "k-space:inventory:edit" in login_user.get("groups", [])
 | 
				
			||||||
        v = ["public", "unlisted"]
 | 
					        v = ["public", "unlisted"]
 | 
				
			||||||
        if can_edit_all:
 | 
					        if can_edit_all:
 | 
				
			||||||
            v.append("private")
 | 
					            v.append("secret")
 | 
				
			||||||
        q.update({
 | 
					        q.update({
 | 
				
			||||||
            "$or": [
 | 
					            "$or": [
 | 
				
			||||||
                {"inventory.visibility": {"$in": v}},
 | 
					                {"inventory.visibility": {"$in": v}},
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user