예제 #1
0
 def _sqlChanges(self):
     from Phoenix.Models import Privilege, Repository, Role
     Member.createTable(ifNotExists=True)
     Role.createTable(ifNotExists=True)
     Repository.createTable(ifNotExists=True)
     Privilege.createTable(ifNotExists=True)
     Hook.createTable(ifNotExists=True)
     Key.createTable(ifNotExists=True)
예제 #2
0
 def _sqlChanges(self):
     from Phoenix.Models import Privilege, Repository, Role
     Member.createTable(ifNotExists=True)
     Role.createTable(ifNotExists=True)
     Repository.createTable(ifNotExists=True)
     Privilege.createTable(ifNotExists=True)
     Hook.createTable(ifNotExists=True)
     Key.createTable(ifNotExists=True)
예제 #3
0
 def role(cls, gid):
     from Phoenix.Models import Role
     if Role.get(gid):
         return True
     return False
예제 #4
0
 def addRole(self, name):
     from Phoenix.Models import Role
     role = Role(name=name, member=self)
     return role
예제 #5
0
파일: Validate.py 프로젝트: tstachl/Phoenix
 def role(cls, gid):
     from Phoenix.Models import Role
     if Role.get(gid):
         return True
     return False