Changes in posting constraints due to rescoping to OCP/K8S-only

- node_state is now read only
- node_state gets set automatically to Installed in the create view
- raise a validation error when creating on non-K8S
- allow SystemAdministrator the 'add' permission for Instances
- expose the new listener_port field
This commit is contained in:
Jeff Bradberry
2022-07-28 14:29:31 -04:00
parent 350efc12f5
commit e4518f7b13
3 changed files with 41 additions and 48 deletions

View File

@@ -579,7 +579,7 @@ class InstanceAccess(BaseAccess):
return super(InstanceAccess, self).can_unattach(obj, sub_obj, relationship, relationship, data=data)
def can_add(self, data):
return False
return self.user.is_superuser
def can_change(self, obj, data):
return False