Beispiel #1
0
    def execute(self, username, cmd, git_bin="git"):

        if not self.has_permissions(username, self.permissions_required[cmd]):
            raise InvalidPermissions("%s has no permissions to run %s on %s" % (username, cmd, self.name))

        shell_cmd = cmd + " '%s'" % self.repo_path

        return subssh.call((git_bin, "shell", "-c", shell_cmd))
Beispiel #2
0
def uptime(user):
    """
    Displays uptime of the system

    Example application for integrating uptime of the host system
    """

    return subssh.call(("uptime"))
Beispiel #3
0
def handle_svn(user, *args):

    # Subversion can handle itself permissions and virtual root.
    # So there's no need to manually check permissions here or
    # transform the virtual root.
    return subssh.call((config.SVNSERVE_BIN,
                            '--tunnel-user='******'-t', '-r',
                            repos_path_with_svn_prefix))