[Bugfix] 修复授权和资产的一部分bug

This commit is contained in:
ibuler
2017-12-19 19:38:09 +08:00
parent b0eace6ad8
commit 3f89701b84
18 changed files with 607 additions and 537 deletions

View File

@@ -198,7 +198,7 @@ class SystemUser(AssetUser):
('P', 'Password'),
('K', 'Public key'),
)
cluster = models.ManyToManyField('assets.Cluster', null=True, blank=True, verbose_name=_("Cluster"))
cluster = models.ManyToManyField('assets.Cluster', blank=True, verbose_name=_("Cluster"))
priority = models.IntegerField(default=10, verbose_name=_("Priority")) # Todo: If user granted more priority user, default will be login as the hign
protocol = models.CharField(max_length=16, choices=PROTOCOL_CHOICES, default='ssh', verbose_name=_('Protocol'))
auto_push = models.BooleanField(default=True, verbose_name=_('Auto push'))