Exemple #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)
Exemple #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)
Exemple #3
0
 def removehook(self):
     logging.info("Defining hook id ...")
     id = self.args.hook_id
     
     logging.info("Checking if hook exists ...")
     hook = Hook.get(id)
     
     if not hook:
         raise Exception("The hook with the id `%s' does not exist." % id)
     
     logging.info("Removing the hook from the database ...")
     hook.destroySelf()
     
     print "Done."
Exemple #4
0
    def removehook(self):
        logging.info("Defining hook id ...")
        id = self.args.hook_id

        logging.info("Checking if hook exists ...")
        hook = Hook.get(id)

        if not hook:
            raise Exception("The hook with the id `%s' does not exist." % id)

        logging.info("Removing the hook from the database ...")
        hook.destroySelf()

        print "Done."
Exemple #5
0
 def hook(cls, id):
     from Phoenix.Models import Hook
     if Hook.get(id):
         return True
     return False
Exemple #6
0
 def getHooksByName(self, name):
     from Phoenix.Models import Hook
     return Hook.selectBy(repository=self, hook=name)
Exemple #7
0
 def getHooksByName(self, name):
     from Phoenix.Models import Hook
     return Hook.selectBy(repository=self, hook=name)
Exemple #8
0
 def addHook(self, hook, command):
     from Phoenix.Models import Hook
     hook = Hook(repository=self, hook=hook, command=command)
     return hook
Exemple #9
0
 def hook(cls, id):
     from Phoenix.Models import Hook
     if Hook.get(id):
         return True
     return False