fix last nyapa with target_server on SAS
This commit is contained in:
parent
a41243bc70
commit
bf84b27e8a
|
@ -12,7 +12,6 @@ from orchestra.utils.python import random_ascii
|
||||||
|
|
||||||
class SaaSBaseForm(PluginDataForm):
|
class SaaSBaseForm(PluginDataForm):
|
||||||
site_url = forms.CharField(label=_("Site URL"), widget=SpanWidget(), required=False)
|
site_url = forms.CharField(label=_("Site URL"), widget=SpanWidget(), required=False)
|
||||||
target_server = forms.CharField(required=False, widget=forms.HiddenInput())
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
exclude = ('database',)
|
exclude = ('database',)
|
||||||
|
|
|
@ -700,7 +700,6 @@ class UNIXUserControllerNewServers(ServiceController):
|
||||||
def get_groups(self, user):
|
def get_groups(self, user):
|
||||||
groups = []
|
groups = []
|
||||||
if user.is_main:
|
if user.is_main:
|
||||||
groups = list(user.account.systemusers.exclude(username=user.username).values_list('username', flat=True))
|
|
||||||
groups.append("main-systemusers")
|
groups.append("main-systemusers")
|
||||||
return groups
|
return groups
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ class PluginForm(forms.ModelForm):
|
||||||
|
|
||||||
class PluginDataForm(PluginForm):
|
class PluginDataForm(PluginForm):
|
||||||
data = forms.CharField(widget=forms.HiddenInput, required=False)
|
data = forms.CharField(widget=forms.HiddenInput, required=False)
|
||||||
target_server = forms.ModelChoiceField(queryset=Server.objects.filter(name__in=WEB_SERVERS),)
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
@ -100,6 +99,8 @@ class ExtendedPluginDataForm(PluginDataForm):
|
||||||
widget=forms.PasswordInput,
|
widget=forms.PasswordInput,
|
||||||
help_text=_("Enter the same password as above, for verification."))
|
help_text=_("Enter the same password as above, for verification."))
|
||||||
|
|
||||||
|
target_server = forms.ModelChoiceField(queryset=Server.objects.filter(name__in=WEB_SERVERS),)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(ExtendedPluginDataForm, self).__init__(*args, **kwargs)
|
super(ExtendedPluginDataForm, self).__init__(*args, **kwargs)
|
||||||
self.fields['sftpuser'].widget = forms.HiddenInput()
|
self.fields['sftpuser'].widget = forms.HiddenInput()
|
||||||
|
|
Loading…
Reference in New Issue