예제 #1
0
파일: git.py 프로젝트: epeli/revisioncask
    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))
예제 #2
0
파일: exampleapp.py 프로젝트: epeli/subssh
def uptime(user):
    """
    Displays uptime of the system

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

    return subssh.call(("uptime"))
예제 #3
0
파일: svn.py 프로젝트: epeli/revisioncask
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))