添加jpermssion models

pull/6/head
ibuler 10 years ago
parent b24ad2854c
commit bc5422821d

@ -1,3 +1,19 @@
from django.db import models
from juser.models import User
from jasset.models import Asset
# Create your models here.
class Permission(models.Model):
PERM_USER_TYPE_CHOICE = (
('S', 'Super'),
('C', 'Common'),
)
user = models.ForeignKey(User)
asset = models.ForeignKey(Asset)
is_ldap = models.BooleanField(default=True)
perm_user_type = models.CharField(choices=PERM_USER_TYPE_CHOICE,
blank=True,
null=True)
def __unicode__(self):
return '%s_%s' % (self.user.username, self.asset.ip)
Loading…
Cancel
Save