List of commits:
Subject Hash Author Date (UTC)
Bulk changes. d5274ef5f261086a2af6bd19ac04061bb3d55584 Catalin(ux) M. BOIE 2011-09-15 20:16:46
Store the fist instalation date in 'state' table. e4ba8a9239e72e8de5eed0b3bb1f2a5f2d429105 Catalin(ux) M. BOIE 2011-08-31 16:14:44
Bulk changes. 645d3deb19e399c05a8b14dd88c5151520482b6a Catalin(ux) M. BOIE 2011-08-25 20:39:25
Another bulk update - css related. 3867eb5deadf9827450b40a53efe6c83f518a07b Catalin(ux) M. BOIE 2011-07-26 22:01:13
Bulk update. 9d680f000b7c486be4664e1cb944f424c977c874 Catalin(ux) M. BOIE 2011-07-25 19:06:14
Some ssh and anonymous rights fixes. 9bb20c348a4933056d8f67bd151eb35cf0325835 Catalin(ux) M. BOIE 2011-07-05 22:00:00
Another round of fixes. 45749c46f79f75b29d83ee2d115f987c7765e8c4 Catalin(ux) M. BOIE 2011-07-05 20:01:10
Another round of bulk updates. 6077961d5c443b8a830dc08b3b0ebf37eaf594b3 Catalin(ux) M. BOIE 2011-07-04 22:12:40
Bump version to 0.7. e44064dab5c6f2fa625bb121483a51ec1960cad9 Catalin(ux) M. BOIE 2011-07-03 16:26:47
Lots of changes. 8876190d55995ed98a528edc786e0e9136a0535d Catalin(ux) M. BOIE 2011-07-03 00:03:42
Make %setup quiet as rpmlint told me. b272b9915498fb0a811be2e2687554bbaf887bf1 Catalin(ux) M. BOIE 2011-07-01 03:26:57
Bump version to 0.3 f626f3c66b7b51af2013e16e954e945ba84c12bb Catalin(ux) M. BOIE 2011-07-01 03:25:44
Added logrotate support b827ee7c179d5b72f6ac3ac255edb6de6decb91a Catalin(ux) M. BOIE 2011-07-01 03:25:13
More bulk updates 6dc2b24ebde74bbb64ef2893e2ddb8b7b9456219 Catalin(ux) M. BOIE 2011-07-01 03:16:01
Bulk changes e3771b115feb49698383730893ced1bac5670cac Catalin(ux) M. BOIE 2011-06-29 21:50:03
Ignore Changelog-last file. 32260f93743a577cbaf7cefd335517e4a42edcf0 Catalin(ux) M. BOIE 2011-06-27 21:20:53
Ignore *.out files. 265ba83a2df891cdcc7b35801a46cfc2583983ee Catalin(ux) M. BOIE 2011-06-27 21:20:23
Added shadow-utils as dependency fot user/groupadd. f5816c0bd992881439706041986a3a178eaf69bd Catalin(ux) M. BOIE 2011-06-27 21:08:32
More rpm fixes. 701daf680d15dc69a2a8709f6de5167b55ce02c2 Catalin(ux) M. BOIE 2011-06-27 21:01:24
Add rocketgit user and group. 1b2f9e1e16ed98d5eadd575a87bf0ff738d710c4 Catalin(ux) M. BOIE 2011-06-27 20:59:59
Commit d5274ef5f261086a2af6bd19ac04061bb3d55584 - Bulk changes.
Author: Catalin(ux) M. BOIE
Author date (UTC): 2011-09-15 20:16
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2011-09-15 20:16
Parent(s): e4ba8a9239e72e8de5eed0b3bb1f2a5f2d429105
Signing key:
Tree: 59321ea91a2d31ff732b908fbff69854e3a34ad8
File Lines added Lines deleted
inc/personal/personal.php 0 113
inc/user/home-page.php 60 0
inc/user/info/info.php 46 0
inc/user/keys/add.form.php 0 0
inc/user/keys/keys.php 0 0
inc/user/pass.form.php 0 0
inc/user/pass/pass.form.php 1 1
inc/user/pass/pass.php 47 0
inc/user/repo-page.php 28 0
root/themes/default/repo/list/footer.html 1 0
root/themes/default/repo/list/header.html 9 0
root/themes/default/repo/list/line.html 10 0
root/themes/default/repo/tree/footer.html 1 0
root/themes/default/repo/tree/header.html 9 0
root/themes/default/repo/tree/line.html 7 0
File inc/personal/personal.php deleted (index 6c62b95..0000000)
1 <?php
2 rg_log("/inc/personal/personal");
3
4 $_personal = "";
5
6 if ($rg_ui['uid'] == 0) {
7 $_personal .= "You do not have access here!";
8 return;
9 }
10
11 // menu
12 $second_menu = array(
13 "edit_info" => array(
14 "text" => "Edit info",
15 "url" => "&amp;subop=1"
16 ),
17 "change_pass" => array(
18 "text" => "Change password",
19 "url" => "&amp;subop=2"
20 )
21 );
22
23 $errmsg = array();
24 $_body = "";
25
26 switch ($subop) {
27 case 1: // edit info
28 $uid = $rg_ui['uid'];
29
30 if ($doit == 1) {
31 // TODO: Check if user has the right to edit this info!
32 if (!rg_token_valid($db, $sid, $token)) {
33 $_body .= "Invalid token. Try again.";
34 return;
35 }
36
37 $xuser = rg_var_str("xuser");
38 $email = rg_var_str("email");
39 $is_admin = $rg_ui['is_admin']; // TODO: doesn't seems too elegant
40 $disk_quota_mb = $rg_ui['disk_quota_mb'];
41 $rights = $rg_ui['rights'];
42 $session_time = rg_var_uint("session_time");
43
44 while (1) {
45 $xpass = "";
46 if (!rg_user_edit($db, $rg_ui['uid'], $xuser, $email, $xpass,
47 $is_admin, $disk_quota_mb, $rights, $session_time, "")) {
48 $errmsg[] = "Cannot change info (" . rg_user_error() . ").";
49 break;
50 }
51
52 $_body .= "OK!<br />";
53 break;
54 }
55 } else {
56 $xuser = $rg_ui['username'];
57 $email = $rg_ui['email'];
58 $is_admin = $rg_ui['is_admin'];
59 $disk_quota_mb = $rg_ui['disk_quota_mb'];
60 $rights = $rg_ui['rights'];
61 $session_time = $rg_ui['session_time'];
62 }
63
64 $admin_mode = 0;
65 $pass_mode = 0;
66 include($INC . "/admin/users/user.form.php");
67 $_body .= $_form;
68 break;
69
70 case 2: // change password
71 $show_form = 1;
72 if ($doit == 1) {
73 $old_pass = rg_var_str("old_pass");
74 $pass1 = rg_var_str("pass1");
75 $pass2 = rg_var_str("pass2");
76
77 while (1) {
78 if (!rg_token_valid($db, $sid, $token)) {
79 $errmsg[] = "Invalid token. Try again.";
80 break;
81 }
82
83 if (strcmp($pass1, $pass2) != 0) {
84 $errmsg[] = "Passwords does not match!";
85 break;
86 }
87
88 if (!rg_user_pass_valid($db, $rg_ui['uid'], $old_pass)) {
89 $errmsg[] = "Old password is invalid!";
90 break;
91 }
92
93 if (!rg_user_set_pass($db, $rg_ui['uid'], $pass1)) {
94 $errmsg[] = rg_user_error();
95 break;
96 }
97
98 $_body .= "OK!<br />";
99 $show_form = 0;
100 break;
101 }
102 }
103
104 if ($show_form == 1) {
105 include($INC . "/personal/pass.form.php");
106 $_body .= $_chpass_form;
107 }
108
109 break;
110 }
111
112 $_personal .= $_body;
113 ?>
File inc/user/home-page.php added (mode: 100644) (index 0000000..363b011)
1 <?php
2 rg_log("/inc/user/home-page");
3
4 $user = rg_var_str("user");
5
6 $_home = "";
7
8 $ui = rg_user_info($db, 0, $user, "");
9 if ($ui === FALSE) {
10 $_home .= "Invalid user!";
11 return;
12 }
13
14 // menu
15 if ($ui['uid'] == $rg_ui['uid']) {
16 $second_menu = array(
17 "edit_info" => array(
18 "text" => "Edit info",
19 "url" => "&amp;subop=edit_info"
20 ),
21 "change_pass" => array(
22 "text" => "Change password",
23 "url" => "&amp;subop=change_pass"
24 ),
25 "keys" => array(
26 "text" => "SSH keys",
27 "url" => "&amp;subop=keys"
28 )
29 );
30 }
31
32 $_home .= "<h1>" . htmlspecialchars($user) . "</h1>\n";
33
34 // list of repositories
35 $_home .= rg_repo_list($db, "", $ui);
36
37 // allow operations if the page is owned by the user visiting it
38 if ($ui['uid'] == $rg_ui['uid']) {
39 $errmsg = array();
40
41 switch ($subop) {
42 case 'edit_info':
43 include($INC . "/user/info/info.php");
44 $_home .= $_info;
45 break;
46
47 case 'change_pass':
48 include($INC . "/user/pass/pass.php");
49 $_home .= $_pass;
50 break;
51
52 case 'keys':
53 include($INC . "/user/keys/keys.php");
54 $_home .= $_keys;
55 break;
56 }
57 }
58
59 ?>
60
File inc/user/info/info.php added (mode: 100644) (index 0000000..50174b3)
1 <?php
2 rg_log("/inc/user/info/info");
3
4 $errmsg = array();
5
6 $_info = "";
7
8 if ($doit == 1) {
9 if (!rg_token_valid($db, $sid, $token)) {
10 $_info .= "Invalid token. Try again.";
11 return;
12 }
13
14 $xuser = rg_var_str("xuser");
15 $email = rg_var_str("email");
16 $is_admin = $rg_ui['is_admin']; // TODO: doesn't seems too elegant
17 $disk_quota_mb = $rg_ui['disk_quota_mb'];
18 $rights = $rg_ui['rights'];
19 $session_time = rg_var_uint("session_time");
20
21 while (1) {
22 $xpass = "";
23 if (!rg_user_edit($db, $rg_ui['uid'], $xuser, $email, $xpass,
24 $is_admin, $disk_quota_mb, $rights, $session_time, "")) {
25 $errmsg[] = "Cannot change info (" . rg_user_error() . ").";
26 break;
27 }
28
29 $_info .= "OK!<br />";
30 break;
31 }
32 } else {
33 $xuser = $rg_ui['username'];
34 $email = $rg_ui['email'];
35 $is_admin = $rg_ui['is_admin'];
36 $disk_quota_mb = $rg_ui['disk_quota_mb'];
37 $rights = $rg_ui['rights'];
38 $session_time = $rg_ui['session_time'];
39 }
40
41 $admin_mode = 0;
42 $pass_mode = 0;
43 include($INC . "/admin/users/user.form.php");
44 $_info .= $_form;
45
46 ?>
File inc/user/keys/add.form.php renamed from inc/keys/add.form.php (similarity 100%)
File inc/user/keys/keys.php renamed from inc/keys/keys.php (similarity 100%)
File inc/user/pass.form.php copied from file inc/personal/pass.form.php (similarity 100%)
File inc/user/pass/pass.form.php renamed from inc/personal/pass.form.php (similarity 94%) (mode: 100644) (index 5206d86..fa19357)
... ... if (count($errmsg) > 0)
5 5 $_chpass_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n"; $_chpass_form .= '<span class="error">' . implode("<br />\n", $errmsg) . '</span><br /><br />' . "\n";
6 6
7 7 $_chpass_form .= ' $_chpass_form .= '
8 <form method="post" action="' . $_SERVER['PHP_SELF'] . '">
8 <form method="post" action="' . rg_re_post($op) . '">
9 9 <input type="hidden" name="op" value="' . $op . '" /> <input type="hidden" name="op" value="' . $op . '" />
10 10 <input type="hidden" name="doit" value="1" /> <input type="hidden" name="doit" value="1" />
11 11 <input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" /> <input type="hidden" name="token" value="' . rg_token_get($db, $sid) . '" />
File inc/user/pass/pass.php added (mode: 100644) (index 0000000..1c039ca)
1 <?php
2 rg_log("/inc/user/pass/pass");
3
4 $errmsg = array();
5
6 $_pass = "";
7
8 $show_form = 1;
9 if ($doit == 1) {
10 $old_pass = rg_var_str("old_pass");
11 $pass1 = rg_var_str("pass1");
12 $pass2 = rg_var_str("pass2");
13
14 while (1) {
15 if (!rg_token_valid($db, $sid, $token)) {
16 $errmsg[] = "Invalid token. Try again.";
17 break;
18 }
19
20 if (strcmp($pass1, $pass2) != 0) {
21 $errmsg[] = "Passwords does not match!";
22 break;
23 }
24
25 if (!rg_user_pass_valid($db, $rg_ui['uid'], $old_pass)) {
26 $errmsg[] = "Old password is invalid!";
27 break;
28 }
29
30 if (!rg_user_set_pass($db, $rg_ui['uid'], $pass1)) {
31 $errmsg[] = rg_user_error();
32 break;
33 }
34
35 $_pass .= "OK!<br />";
36 $show_form = 0;
37 break;
38 }
39 }
40
41 if ($show_form == 1) {
42 include($INC . "/user/pass/pass.form.php");
43 $_pass .= $_chpass_form;
44 }
45
46 ?>
47
File inc/user/repo-page.php added (mode: 100644) (index 0000000..430eeca)
1 <?php
2 rg_log("/inc/user/repo-page");
3
4 $user = rg_var_str("user");
5 $repo = rg_var_str("repo");
6
7 $_home = "";
8
9 if (rg_user_ok($repo) !== TRUE) {
10 $_home .= "Invalid repo!";
11 return;
12 }
13
14 if (rg_repo_ok($repo) !== TRUE) {
15 $_home .= "Invalid repo!";
16 return;
17 }
18
19 $_home .= "<h1>" . htmlspecialchars($repo) . "</h1>\n";
20
21 $rr = array("type" => "user", "user" => $user, "repo" => $repo);
22 $repo_dir = rg_repo_name2base($rr) . $repo . ".git";
23 $_tree = rg_git_ls_tree($repo_dir, "");
24 $_more = array("url" => "xxxxx");
25 $_home .= rg_template($THEME . "/repo/tree", $_tree, $_more);
26
27 ?>
28
File root/themes/default/repo/list/footer.html added (mode: 100644) (index 0000000..000ca4b)
1 </table>
File root/themes/default/repo/list/header.html added (mode: 100644) (index 0000000..bc86541)
1 <table>
2 <tr>
3 <th>Mode</th>
4 <th>Type</th>
5 <th>Size</th>
6 <th>File</th>
7 <th>Ref</th>
8 </tr>
9
File root/themes/default/repo/list/line.html added (mode: 100644) (index 0000000..adfb29f)
1 <tr>
2 <td><a href="@@url@@">@@owner@@/@@name@@</a></td>
3 <td>@@description@@</td>
4 <td>@@clone_of@@</td>
5 <td>@@creation@@</td>
6 <td>@@rights@@</td>
7 <td>@@disk_used@@</td>
8 <td>@@max_commit_size@@</td>
9 <td>@@max_users@@</td>
10 </tr>
File root/themes/default/repo/tree/footer.html added (mode: 100644) (index 0000000..000ca4b)
1 </table>
File root/themes/default/repo/tree/header.html added (mode: 100644) (index 0000000..bc86541)
1 <table>
2 <tr>
3 <th>Mode</th>
4 <th>Type</th>
5 <th>Size</th>
6 <th>File</th>
7 <th>Ref</th>
8 </tr>
9
File root/themes/default/repo/tree/line.html added (mode: 100644) (index 0000000..2812c1d)
1 <tr>
2 <td>@@mode@@</td>
3 <td>@@type@@</td>
4 <td>@@size@@</td>
5 <td>@@file@@</td>
6 <td>@@ref@@</td>
7 </tr>
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main