fix last nyapa with target_server on SAS
This commit is contained in:
parent
c94342141e
commit
5a6b972b51
|
@ -12,7 +12,6 @@ from orchestra.utils.python import random_ascii
|
|||
|
||||
class SaaSBaseForm(PluginDataForm):
|
||||
site_url = forms.CharField(label=_("Site URL"), widget=SpanWidget(), required=False)
|
||||
target_server = forms.CharField(required=False, widget=forms.HiddenInput())
|
||||
|
||||
class Meta:
|
||||
exclude = ('database',)
|
||||
|
|
|
@ -700,7 +700,6 @@ class UNIXUserControllerNewServers(ServiceController):
|
|||
def get_groups(self, user):
|
||||
groups = []
|
||||
if user.is_main:
|
||||
groups = list(user.account.systemusers.exclude(username=user.username).values_list('username', flat=True))
|
||||
groups.append("main-systemusers")
|
||||
return groups
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ class PluginForm(forms.ModelForm):
|
|||
|
||||
class PluginDataForm(PluginForm):
|
||||
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):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
@ -100,6 +99,8 @@ class ExtendedPluginDataForm(PluginDataForm):
|
|||
widget=forms.PasswordInput,
|
||||
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):
|
||||
super(ExtendedPluginDataForm, self).__init__(*args, **kwargs)
|
||||
self.fields['sftpuser'].widget = forms.HiddenInput()
|
||||
|
|
Loading…
Reference in a new issue