xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit 0a81a2824087d9dcd2d1981c860946fd49cc8bf7

Admin user must not confirm the account by e-mail
Author: Catalin(ux) M. BOIE
Author date (UTC): 2015-11-18 18:04
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2015-11-18 18:04
Parent(s): 363368555480d4c79c13867805c59541fd59e37c
Signing key:
Tree: 3879066bab6776875b0782f95e7948b38ab322f5
File Lines added Lines deleted
inc/user.inc.php 4 4
tests/Makefile 1 1
tests/user.php 2 0
File inc/user.inc.php changed (mode: 100644) (index aeb083f..b7511a6)
... ... function rg_user_edit($db, $d)
450 450 // TODO: check rights // TODO: check rights
451 451 // TODO - check if user is allowed to give passed rights // TODO - check if user is allowed to give passed rights
452 452
453 if ($rg_account_email_confirm == 0) {
453 if (($d['confirmed'] == 0)
454 && ($rg_account_email_confirm == 0)) {
454 455 // no need to confirm account // no need to confirm account
455 $d['confirmed'] = 1; // signals "no-need-to-confirm"
456 } else {
457 $d['confirmed'] = 0;
456 $d['confirmed'] = 1;
458 457 } }
459 458
460 459 $update_pass = !empty($d['pass']); $update_pass = !empty($d['pass']);
 
... ... function rg_user_edit_high_level($db, &$rg)
1548 1547 $ui['plan_id'] = rg_var_uint("plan_id"); $ui['plan_id'] = rg_var_uint("plan_id");
1549 1548 $ui['session_time'] = rg_var_uint("session_time"); $ui['session_time'] = rg_var_uint("session_time");
1550 1549 $ui['confirm_token'] = rg_id(20); $ui['confirm_token'] = rg_id(20);
1550 $ui['confirmed'] = 0;
1551 1551 if ($rg['no_tos'] == 1) if ($rg['no_tos'] == 1)
1552 1552 $ui['tos'] = 1; $ui['tos'] = 1;
1553 1553 else else
File tests/Makefile changed (mode: 100644) (index 4a322a8..dddf9ee)
... ... clean:
102 102 @rm -rf git_log1 *.log *.strace *.strace.* *.out *.lock err-* *.diff \ @rm -rf git_log1 *.log *.strace *.strace.* *.out *.lock err-* *.diff \
103 103 http.arond *.pub git2key git2 *.in q_merge_requests/mr-* \ http.arond *.pub git2key git2 *.in q_merge_requests/mr-* \
104 104 qstats/* repos/* helper helper.pub keys/* ca *.pid pr_anon.git \ qstats/* repos/* helper helper.pub keys/* ca *.pid pr_anon.git \
105 *.tmp
105 *.tmp base ubase
File tests/user.php changed (mode: 100644) (index 2989569..f516f82)
... ... $_u['is_admin'] = 1;
56 56 $_u['rights'] = "C"; $_u['rights'] = "C";
57 57 $_u['session_time'] = 3600; $_u['session_time'] = 3600;
58 58 $_u['confirm_token'] = ""; $_u['confirm_token'] = "";
59 $_u['confirmed'] = 0;
59 60 $_u['plan_id'] = 1000; $_u['plan_id'] = 1000;
60 61 $uid = rg_user_edit($db, $_u); $uid = rg_user_edit($db, $_u);
61 62 if ($uid === FALSE) { if ($uid === FALSE) {
 
... ... $_u['is_admin'] = 1;
182 183 $_u['rights'] = "C"; $_u['rights'] = "C";
183 184 $_u['session_time'] = 3600; $_u['session_time'] = 3600;
184 185 $_u['confirm_token'] = ""; $_u['confirm_token'] = "";
186 $_u['confirmed'] = 0;
185 187 $_u['plan_id'] = 1000; $_u['plan_id'] = 1000;
186 188 $uid5 = rg_user_edit($db, $_u); $uid5 = rg_user_edit($db, $_u);
187 189 if ($uid5 === FALSE) { if ($uid5 === FALSE) {
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://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

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