Indefero

Indefero Commit Details


Date:2009-01-20 03:33:56 (15 years 11 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:61f53c518f100e49e80821432edcc9bf7ac1fe82
Parents: e21b4d87b9fa4eee35b7eff640a86d1be3d0577d
Message:Added the latest elements of the git repositories control.

Now, need to write the documentation.
Changes:

File differences

src/IDF/Plugin/SyncGit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
# ***** BEGIN LICENSE BLOCK *****
# This file is part of InDefero, an open source project management application.
# Copyright (C) 2008 CĂ©ondo Ltd and contributors.
#
# InDefero is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# InDefero is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# ***** END LICENSE BLOCK ***** */
/**
* This class is a plugin which allows to synchronise access riths
* between InDefero and a common restricted SSH account for git
* access.
*
* As the authentication is directly performed by accessing the
* InDefero database, we only need to synchronize the SSH keys. This
* synchronization process can only be performed by a process running
* under the git user as we need to write in
* /home/git/.ssh/authorized_keys
*
* So, here, we are just creating a file informing that a sync needs
* to be done. We connect this plugin to the IDF_Key::postSave signal.
*/
class IDF_Plugin_SyncGit
{
/**
* Entry point of the plugin.
*/
static public function entry($signal, &$params)
{
// First check for the single mandatory config variable.
if (!Pluf::f('idf_plugin_syncgit_sync_file', false)) {
return;
}
@touch(Pluf::f('idf_plugin_syncgit_sync_file'));
}
}
src/IDF/Plugin/SyncGit/Cron.php
2929
3030
3131
32
32
3333
3434
3535
/**
* Template for the SSH key.
*/
public $template = 'command="php %s %s",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s';
public $template = 'command="python %s %s",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s';
/**
* Synchronize.
src/IDF/relations.php
6060
6161
6262
63
64
65
66
67
68
6369
array('IDF_Plugin_SyncMercurial', 'entry'));
Pluf_Signal::connect('Pluf_User::passwordUpdated',
array('IDF_Plugin_SyncMercurial', 'entry'));
#
# Git synchronization
Pluf_Signal::connect('IDF_Key::postSave',
array('IDF_Plugin_SyncGit', 'entry'));
return $m;

Archive Download the corresponding diff file

Page rendered in 0.07526s using 13 queries.