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)
def role(cls, gid): from Phoenix.Models import Role if Role.get(gid): return True return False
def addRole(self, name): from Phoenix.Models import Role role = Role(name=name, member=self) return role