Fossil SCM

Work toward getting bug-tracking working well.

drh 2008-07-15 16:42 trunk
Commit d3e711fd2fd664e54610498a49b6ad6ee0ad5f8a
+1 -3
--- src/login.c
+++ src/login.c
@@ -308,11 +308,11 @@
308308
void login_set_capabilities(const char *zCap){
309309
int i;
310310
for(i=0; zCap[i]; i++){
311311
switch( zCap[i] ){
312312
case 's': g.okSetup = 1;
313
- case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = g.okQuery =
313
+ case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt =
314314
g.okRdWiki = g.okWrWiki = g.okNewWiki =
315315
g.okApndWiki = g.okHistory = g.okClone =
316316
g.okNewTkt = g.okPassword = g.okRdAddr =
317317
g.okTktFmt = 1;
318318
case 'i': g.okRead = g.okWrite = 1; break;
@@ -320,11 +320,10 @@
320320
321321
case 'd': g.okDelete = 1; break;
322322
case 'h': g.okHistory = 1; break;
323323
case 'g': g.okClone = 1; break;
324324
case 'p': g.okPassword = 1; break;
325
- case 'q': g.okQuery = 1; break;
326325
327326
case 'j': g.okRdWiki = 1; break;
328327
case 'k': g.okWrWiki = g.okRdWiki = g.okApndWiki =1; break;
329328
case 'm': g.okApndWiki = 1; break;
330329
case 'f': g.okNewWiki = 1; break;
@@ -363,11 +362,10 @@
363362
case 'k': rc = g.okWrWiki; break;
364363
case 'm': rc = g.okApndWiki; break;
365364
case 'n': rc = g.okNewTkt; break;
366365
case 'o': rc = g.okRead; break;
367366
case 'p': rc = g.okPassword; break;
368
- case 'q': rc = g.okQuery; break;
369367
case 'r': rc = g.okRdTkt; break;
370368
case 's': rc = g.okSetup; break;
371369
case 't': rc = g.okTktFmt; break;
372370
case 'w': rc = g.okWrTkt; break;
373371
default: rc = 0; break;
374372
--- src/login.c
+++ src/login.c
@@ -308,11 +308,11 @@
308 void login_set_capabilities(const char *zCap){
309 int i;
310 for(i=0; zCap[i]; i++){
311 switch( zCap[i] ){
312 case 's': g.okSetup = 1;
313 case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = g.okQuery =
314 g.okRdWiki = g.okWrWiki = g.okNewWiki =
315 g.okApndWiki = g.okHistory = g.okClone =
316 g.okNewTkt = g.okPassword = g.okRdAddr =
317 g.okTktFmt = 1;
318 case 'i': g.okRead = g.okWrite = 1; break;
@@ -320,11 +320,10 @@
320
321 case 'd': g.okDelete = 1; break;
322 case 'h': g.okHistory = 1; break;
323 case 'g': g.okClone = 1; break;
324 case 'p': g.okPassword = 1; break;
325 case 'q': g.okQuery = 1; break;
326
327 case 'j': g.okRdWiki = 1; break;
328 case 'k': g.okWrWiki = g.okRdWiki = g.okApndWiki =1; break;
329 case 'm': g.okApndWiki = 1; break;
330 case 'f': g.okNewWiki = 1; break;
@@ -363,11 +362,10 @@
363 case 'k': rc = g.okWrWiki; break;
364 case 'm': rc = g.okApndWiki; break;
365 case 'n': rc = g.okNewTkt; break;
366 case 'o': rc = g.okRead; break;
367 case 'p': rc = g.okPassword; break;
368 case 'q': rc = g.okQuery; break;
369 case 'r': rc = g.okRdTkt; break;
370 case 's': rc = g.okSetup; break;
371 case 't': rc = g.okTktFmt; break;
372 case 'w': rc = g.okWrTkt; break;
373 default: rc = 0; break;
374
--- src/login.c
+++ src/login.c
@@ -308,11 +308,11 @@
308 void login_set_capabilities(const char *zCap){
309 int i;
310 for(i=0; zCap[i]; i++){
311 switch( zCap[i] ){
312 case 's': g.okSetup = 1;
313 case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt =
314 g.okRdWiki = g.okWrWiki = g.okNewWiki =
315 g.okApndWiki = g.okHistory = g.okClone =
316 g.okNewTkt = g.okPassword = g.okRdAddr =
317 g.okTktFmt = 1;
318 case 'i': g.okRead = g.okWrite = 1; break;
@@ -320,11 +320,10 @@
320
321 case 'd': g.okDelete = 1; break;
322 case 'h': g.okHistory = 1; break;
323 case 'g': g.okClone = 1; break;
324 case 'p': g.okPassword = 1; break;
 
325
326 case 'j': g.okRdWiki = 1; break;
327 case 'k': g.okWrWiki = g.okRdWiki = g.okApndWiki =1; break;
328 case 'm': g.okApndWiki = 1; break;
329 case 'f': g.okNewWiki = 1; break;
@@ -363,11 +362,10 @@
362 case 'k': rc = g.okWrWiki; break;
363 case 'm': rc = g.okApndWiki; break;
364 case 'n': rc = g.okNewTkt; break;
365 case 'o': rc = g.okRead; break;
366 case 'p': rc = g.okPassword; break;
 
367 case 'r': rc = g.okRdTkt; break;
368 case 's': rc = g.okSetup; break;
369 case 't': rc = g.okTktFmt; break;
370 case 'w': rc = g.okWrTkt; break;
371 default: rc = 0; break;
372
+15 -6
--- src/report.c
+++ src/report.c
@@ -35,19 +35,20 @@
3535
** WEBPAGE: /reportlist
3636
*/
3737
void view_list(void){
3838
Stmt q;
3939
int rn = 0;
40
- int cnt = 1;
40
+ int cnt = 0;
4141
4242
login_check_credentials();
4343
if( !g.okRdTkt && !g.okNewTkt ){ login_needed(); return; }
4444
style_header("Bug Report Main Menu");
4545
if( g.okNewTkt ){
4646
@ <p>Enter a new bug report:</p>
4747
@ <ol><li value="1"><a href="tktnew">New bug report</a></li></ol>
4848
@
49
+ cnt++;
4950
}
5051
if( !g.okRdTkt ){
5152
@ <p>You are not authorized to view existing bug reports.</p>
5253
}else{
5354
db_prepare(&q, "SELECT rn, title, owner FROM reportfmt ORDER BY title");
@@ -67,11 +68,13 @@
6768
@ [<a href="rptedit?rn=%d(rn)&amp;copy=1" rel="nofollow">copy</a>]
6869
}
6970
if( g.okAdmin || (g.okWrTkt && zOwner && strcmp(g.zLogin,zOwner)==0) ){
7071
@ [<a href="rptedit?rn=%d(rn)" rel="nofollow">edit</a>]
7172
}
72
- @ [<a href="rptsql?rn=%d(rn)" rel="nofollow">sql</a>]
73
+ if( g.okTktFmt ){
74
+ @ [<a href="rptsql?rn=%d(rn)" rel="nofollow">sql</a>]
75
+ }
7376
@ </li>
7477
}
7578
}
7679
@ </ol>
7780
if( g.okTktFmt ){
@@ -252,11 +255,11 @@
252255
const char *zOwner;
253256
const char *zClrKey;
254257
Stmt q;
255258
256259
login_check_credentials();
257
- if( !g.okQuery ){
260
+ if( !g.okTktFmt ){
258261
login_needed();
259262
return;
260263
}
261264
rn = atoi(PD("rn","0"));
262265
db_prepare(&q, "SELECT title, sqlcode, owner, cols "
@@ -300,11 +303,11 @@
300303
const char *zClrKey;
301304
char *zSQL;
302305
char *zErr = 0;
303306
304307
login_check_credentials();
305
- if( !g.okQuery ){
308
+ if( !g.okTktFmt ){
306309
login_needed();
307310
return;
308311
}
309312
/*view_add_functions(0);*/
310313
rn = atoi(PD("rn","0"));
@@ -434,10 +437,14 @@
434437
** formats
435438
*/
436439
static void report_format_hints(void){
437440
char *zSchema;
438441
zSchema = db_text(0,"SELECT sql FROM sqlite_master WHERE name='ticket'");
442
+ if( zSchema==0 ){
443
+ zSchema = db_text(0,"SELECT sql FROM repository.sqlite_master"
444
+ " WHERE name='ticket'");
445
+ }
439446
@ <hr><h3>TICKET Schema</h3>
440447
@ <blockquote><pre>
441448
@ %h(zSchema)
442449
@ </pre></blockquote>
443450
@ <h3>Notes</h3>
@@ -913,14 +920,16 @@
913920
914921
db_multi_exec("PRAGMA empty_result_callbacks=ON");
915922
style_submenu_element("Raw", "Raw",
916923
"rptview?tablist=1&%s", PD("QUERY_STRING",""));
917924
if( g.okAdmin
918
- || (g.okQuery && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){
925
+ || (g.okTktFmt && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){
919926
style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn);
920927
}
921
- style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn);
928
+ if( g.okTktFmt ){
929
+ style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn);
930
+ }
922931
style_header(zTitle);
923932
output_color_key(zClrKey, 1,
924933
"border=0 cellpadding=3 cellspacing=0 class=\"report\"");
925934
@ <table border=1 cellpadding=2 cellspacing=0 class="report">
926935
sState.rn = rn;
927936
--- src/report.c
+++ src/report.c
@@ -35,19 +35,20 @@
35 ** WEBPAGE: /reportlist
36 */
37 void view_list(void){
38 Stmt q;
39 int rn = 0;
40 int cnt = 1;
41
42 login_check_credentials();
43 if( !g.okRdTkt && !g.okNewTkt ){ login_needed(); return; }
44 style_header("Bug Report Main Menu");
45 if( g.okNewTkt ){
46 @ <p>Enter a new bug report:</p>
47 @ <ol><li value="1"><a href="tktnew">New bug report</a></li></ol>
48 @
 
49 }
50 if( !g.okRdTkt ){
51 @ <p>You are not authorized to view existing bug reports.</p>
52 }else{
53 db_prepare(&q, "SELECT rn, title, owner FROM reportfmt ORDER BY title");
@@ -67,11 +68,13 @@
67 @ [<a href="rptedit?rn=%d(rn)&amp;copy=1" rel="nofollow">copy</a>]
68 }
69 if( g.okAdmin || (g.okWrTkt && zOwner && strcmp(g.zLogin,zOwner)==0) ){
70 @ [<a href="rptedit?rn=%d(rn)" rel="nofollow">edit</a>]
71 }
72 @ [<a href="rptsql?rn=%d(rn)" rel="nofollow">sql</a>]
 
 
73 @ </li>
74 }
75 }
76 @ </ol>
77 if( g.okTktFmt ){
@@ -252,11 +255,11 @@
252 const char *zOwner;
253 const char *zClrKey;
254 Stmt q;
255
256 login_check_credentials();
257 if( !g.okQuery ){
258 login_needed();
259 return;
260 }
261 rn = atoi(PD("rn","0"));
262 db_prepare(&q, "SELECT title, sqlcode, owner, cols "
@@ -300,11 +303,11 @@
300 const char *zClrKey;
301 char *zSQL;
302 char *zErr = 0;
303
304 login_check_credentials();
305 if( !g.okQuery ){
306 login_needed();
307 return;
308 }
309 /*view_add_functions(0);*/
310 rn = atoi(PD("rn","0"));
@@ -434,10 +437,14 @@
434 ** formats
435 */
436 static void report_format_hints(void){
437 char *zSchema;
438 zSchema = db_text(0,"SELECT sql FROM sqlite_master WHERE name='ticket'");
 
 
 
 
439 @ <hr><h3>TICKET Schema</h3>
440 @ <blockquote><pre>
441 @ %h(zSchema)
442 @ </pre></blockquote>
443 @ <h3>Notes</h3>
@@ -913,14 +920,16 @@
913
914 db_multi_exec("PRAGMA empty_result_callbacks=ON");
915 style_submenu_element("Raw", "Raw",
916 "rptview?tablist=1&%s", PD("QUERY_STRING",""));
917 if( g.okAdmin
918 || (g.okQuery && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){
919 style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn);
920 }
921 style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn);
 
 
922 style_header(zTitle);
923 output_color_key(zClrKey, 1,
924 "border=0 cellpadding=3 cellspacing=0 class=\"report\"");
925 @ <table border=1 cellpadding=2 cellspacing=0 class="report">
926 sState.rn = rn;
927
--- src/report.c
+++ src/report.c
@@ -35,19 +35,20 @@
35 ** WEBPAGE: /reportlist
36 */
37 void view_list(void){
38 Stmt q;
39 int rn = 0;
40 int cnt = 0;
41
42 login_check_credentials();
43 if( !g.okRdTkt && !g.okNewTkt ){ login_needed(); return; }
44 style_header("Bug Report Main Menu");
45 if( g.okNewTkt ){
46 @ <p>Enter a new bug report:</p>
47 @ <ol><li value="1"><a href="tktnew">New bug report</a></li></ol>
48 @
49 cnt++;
50 }
51 if( !g.okRdTkt ){
52 @ <p>You are not authorized to view existing bug reports.</p>
53 }else{
54 db_prepare(&q, "SELECT rn, title, owner FROM reportfmt ORDER BY title");
@@ -67,11 +68,13 @@
68 @ [<a href="rptedit?rn=%d(rn)&amp;copy=1" rel="nofollow">copy</a>]
69 }
70 if( g.okAdmin || (g.okWrTkt && zOwner && strcmp(g.zLogin,zOwner)==0) ){
71 @ [<a href="rptedit?rn=%d(rn)" rel="nofollow">edit</a>]
72 }
73 if( g.okTktFmt ){
74 @ [<a href="rptsql?rn=%d(rn)" rel="nofollow">sql</a>]
75 }
76 @ </li>
77 }
78 }
79 @ </ol>
80 if( g.okTktFmt ){
@@ -252,11 +255,11 @@
255 const char *zOwner;
256 const char *zClrKey;
257 Stmt q;
258
259 login_check_credentials();
260 if( !g.okTktFmt ){
261 login_needed();
262 return;
263 }
264 rn = atoi(PD("rn","0"));
265 db_prepare(&q, "SELECT title, sqlcode, owner, cols "
@@ -300,11 +303,11 @@
303 const char *zClrKey;
304 char *zSQL;
305 char *zErr = 0;
306
307 login_check_credentials();
308 if( !g.okTktFmt ){
309 login_needed();
310 return;
311 }
312 /*view_add_functions(0);*/
313 rn = atoi(PD("rn","0"));
@@ -434,10 +437,14 @@
437 ** formats
438 */
439 static void report_format_hints(void){
440 char *zSchema;
441 zSchema = db_text(0,"SELECT sql FROM sqlite_master WHERE name='ticket'");
442 if( zSchema==0 ){
443 zSchema = db_text(0,"SELECT sql FROM repository.sqlite_master"
444 " WHERE name='ticket'");
445 }
446 @ <hr><h3>TICKET Schema</h3>
447 @ <blockquote><pre>
448 @ %h(zSchema)
449 @ </pre></blockquote>
450 @ <h3>Notes</h3>
@@ -913,14 +920,16 @@
920
921 db_multi_exec("PRAGMA empty_result_callbacks=ON");
922 style_submenu_element("Raw", "Raw",
923 "rptview?tablist=1&%s", PD("QUERY_STRING",""));
924 if( g.okAdmin
925 || (g.okTktFmt && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){
926 style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn);
927 }
928 if( g.okTktFmt ){
929 style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn);
930 }
931 style_header(zTitle);
932 output_color_key(zClrKey, 1,
933 "border=0 cellpadding=3 cellspacing=0 class=\"report\"");
934 @ <table border=1 cellpadding=2 cellspacing=0 class="report">
935 sState.rn = rn;
936
+11 -13
--- src/setup.c
+++ src/setup.c
@@ -147,11 +147,10 @@
147147
@ <li value="11"><b>Write-Wiki</b>: Edit wiki pages</li>
148148
@ <li value="13"><b>Append-Wiki</b>: Append to wiki pages</li>
149149
@ <li value="14"><b>New-Tkt</b>: Create new tickets</li>
150150
@ <li value="15"><b>Check-Out</b>: Check out versions</li>
151151
@ <li value="16"><b>Password</b>: Change your own password</li>
152
- @ <li value="17"><b>Query</b>: Create new queries against tickets</li>
153152
@ <li value="18"><b>Read-Tkt</b>: View tickets</li>
154153
@ <li value="19"><b>Setup:</b> Setup and configure this website</li>
155154
@ <li value="20"><b>Tkt-Report:</b> Create new bug summary reports</li>
156155
@ <li value="23"><b>Write-Tkt</b>: Edit tickets</li>
157156
@ </ol>
@@ -173,11 +172,11 @@
173172
** WEBPAGE: /setup_uedit
174173
*/
175174
void user_edit(void){
176175
const char *zId, *zLogin, *zInfo, *zCap;
177176
char *oaa, *oas, *oar, *oaw, *oan, *oai, *oaj, *oao, *oap;
178
- char *oak, *oad, *oaq, *oac, *oaf, *oam, *oah, *oag, *oae;
177
+ char *oak, *oad, *oac, *oaf, *oam, *oah, *oag, *oae;
179178
char *oat;
180179
int doWrite;
181180
int uid;
182181
int higherUser = 0; /* True if user being edited is SETUP and the */
183182
/* user doing the editing is ADMIN. Disallow editing */
@@ -220,11 +219,10 @@
220219
int aj = P("aj")!=0;
221220
int ak = P("ak")!=0;
222221
int an = P("an")!=0;
223222
int ao = P("ao")!=0;
224223
int ap = P("ap")!=0;
225
- int aq = P("aq")!=0;
226224
int ar = P("ar")!=0;
227225
int as = g.okSetup && P("as")!=0;
228226
int aw = P("aw")!=0;
229227
int ac = P("ac")!=0;
230228
int af = P("af")!=0;
@@ -244,11 +242,10 @@
244242
if( ak ){ zCap[i++] = 'k'; }
245243
if( am ){ zCap[i++] = 'm'; }
246244
if( an ){ zCap[i++] = 'n'; }
247245
if( ao ){ zCap[i++] = 'o'; }
248246
if( ap ){ zCap[i++] = 'p'; }
249
- if( aq ){ zCap[i++] = 'q'; }
250247
if( ar ){ zCap[i++] = 'r'; }
251248
if( as ){ zCap[i++] = 's'; }
252249
if( at ){ zCap[i++] = 't'; }
253250
if( aw ){ zCap[i++] = 'w'; }
254251
@@ -282,11 +279,11 @@
282279
*/
283280
zLogin = "";
284281
zInfo = "";
285282
zCap = "";
286283
oaa = oac = oad = oae = oaf = oag = oah = oai = oaj = oak = oam =
287
- oan = oao = oap = oaq = oar = oas = oat = oaw = "";
284
+ oan = oao = oap = oar = oas = oat = oaw = "";
288285
if( uid ){
289286
zLogin = db_text("", "SELECT login FROM user WHERE uid=%d", uid);
290287
zInfo = db_text("", "SELECT info FROM user WHERE uid=%d", uid);
291288
zCap = db_text("", "SELECT cap FROM user WHERE uid=%d", uid);
292289
if( strchr(zCap, 'a') ) oaa = " checked";
@@ -301,11 +298,10 @@
301298
if( strchr(zCap, 'k') ) oak = " checked";
302299
if( strchr(zCap, 'm') ) oam = " checked";
303300
if( strchr(zCap, 'n') ) oan = " checked";
304301
if( strchr(zCap, 'o') ) oao = " checked";
305302
if( strchr(zCap, 'p') ) oap = " checked";
306
- if( strchr(zCap, 'q') ) oaq = " checked";
307303
if( strchr(zCap, 'r') ) oar = " checked";
308304
if( strchr(zCap, 's') ) oas = " checked";
309305
if( strchr(zCap, 't') ) oat = " checked";
310306
if( strchr(zCap, 'w') ) oaw = " checked";
311307
}
@@ -345,11 +341,10 @@
345341
}
346342
@ <input type="checkbox" name="aa"%s(oaa)>Admin</input><br>
347343
@ <input type="checkbox" name="ad"%s(oad)>Delete</input><br>
348344
@ <input type="checkbox" name="ae"%s(oad)>Email</input><br>
349345
@ <input type="checkbox" name="ap"%s(oap)>Password</input><br>
350
- @ <input type="checkbox" name="aq"%s(oaq)>Query</input><br>
351346
@ <input type="checkbox" name="ai"%s(oai)>Check-In</input><br>
352347
@ <input type="checkbox" name="ao"%s(oao)>Check-Out</input><br>
353348
@ <input type="checkbox" name="ah"%s(oah)>History</input><br>
354349
@ <input type="checkbox" name="ag"%s(oag)>Clone</input><br>
355350
@ <input type="checkbox" name="aj"%s(oaj)>Read Wiki</input><br>
@@ -390,16 +385,10 @@
390385
@ users. This capability is intended for deletion of spam. The
391386
@ delete capability is only in effect for 24 hours after the item
392387
@ is first posted. The Setup user can delete anything at any time.
393388
@ </p></li>
394389
@
395
- @ <li><p>
396
- @ The <b>Query</b> privilege allows the user to create or edit
397
- @ report formats by specifying appropriate SQL. Users can run
398
- @ existing reports without the Query privilege.
399
- @ </p></li>
400
- @
401390
@ <li><p>
402391
@ An <b>Admin</b> user can add other users, create new ticket report
403392
@ formats, and change system defaults. But only the <b>Setup</b> user
404393
@ is able to change the repository to
405394
@ which this program is linked.
@@ -409,10 +398,19 @@
409398
@ The <b>History</b> privilege allows a user to see a timeline
410399
@ with hyperlinks to version information, to download ZIP archives
411400
@ of individual versions.
412401
@ </p></li>
413402
@
403
+ @ <li><p>
404
+ @ The <b>Read Wiki</b>, <b>New Wiki</b>, <b>Append Wiki</b>, and
405
+ @ <b>Write Wiki</b> privileges control access to wiki pages. The
406
+ @ <b>Read Tkt</b>, <b>New Tkt</b>, <b>Append Tkt</b>, and
407
+ @ <b>Write Tkt</b> privileges control access to trouble tickets.
408
+ @ The <b>Tkt Report</b> privilege allows the user to create or edit
409
+ @ ticket report formats.
410
+ @ </p></li>
411
+ @
414412
@ <li><p>
415413
@ No login is required for user "<b>nobody</b>". The capabilities
416414
@ of this user are available to anyone without supplying a username or
417415
@ password. To disable nobody access, make sure there is no user
418416
@ with an ID of <b>nobody</b> or that the nobody user has no
419417
--- src/setup.c
+++ src/setup.c
@@ -147,11 +147,10 @@
147 @ <li value="11"><b>Write-Wiki</b>: Edit wiki pages</li>
148 @ <li value="13"><b>Append-Wiki</b>: Append to wiki pages</li>
149 @ <li value="14"><b>New-Tkt</b>: Create new tickets</li>
150 @ <li value="15"><b>Check-Out</b>: Check out versions</li>
151 @ <li value="16"><b>Password</b>: Change your own password</li>
152 @ <li value="17"><b>Query</b>: Create new queries against tickets</li>
153 @ <li value="18"><b>Read-Tkt</b>: View tickets</li>
154 @ <li value="19"><b>Setup:</b> Setup and configure this website</li>
155 @ <li value="20"><b>Tkt-Report:</b> Create new bug summary reports</li>
156 @ <li value="23"><b>Write-Tkt</b>: Edit tickets</li>
157 @ </ol>
@@ -173,11 +172,11 @@
173 ** WEBPAGE: /setup_uedit
174 */
175 void user_edit(void){
176 const char *zId, *zLogin, *zInfo, *zCap;
177 char *oaa, *oas, *oar, *oaw, *oan, *oai, *oaj, *oao, *oap;
178 char *oak, *oad, *oaq, *oac, *oaf, *oam, *oah, *oag, *oae;
179 char *oat;
180 int doWrite;
181 int uid;
182 int higherUser = 0; /* True if user being edited is SETUP and the */
183 /* user doing the editing is ADMIN. Disallow editing */
@@ -220,11 +219,10 @@
220 int aj = P("aj")!=0;
221 int ak = P("ak")!=0;
222 int an = P("an")!=0;
223 int ao = P("ao")!=0;
224 int ap = P("ap")!=0;
225 int aq = P("aq")!=0;
226 int ar = P("ar")!=0;
227 int as = g.okSetup && P("as")!=0;
228 int aw = P("aw")!=0;
229 int ac = P("ac")!=0;
230 int af = P("af")!=0;
@@ -244,11 +242,10 @@
244 if( ak ){ zCap[i++] = 'k'; }
245 if( am ){ zCap[i++] = 'm'; }
246 if( an ){ zCap[i++] = 'n'; }
247 if( ao ){ zCap[i++] = 'o'; }
248 if( ap ){ zCap[i++] = 'p'; }
249 if( aq ){ zCap[i++] = 'q'; }
250 if( ar ){ zCap[i++] = 'r'; }
251 if( as ){ zCap[i++] = 's'; }
252 if( at ){ zCap[i++] = 't'; }
253 if( aw ){ zCap[i++] = 'w'; }
254
@@ -282,11 +279,11 @@
282 */
283 zLogin = "";
284 zInfo = "";
285 zCap = "";
286 oaa = oac = oad = oae = oaf = oag = oah = oai = oaj = oak = oam =
287 oan = oao = oap = oaq = oar = oas = oat = oaw = "";
288 if( uid ){
289 zLogin = db_text("", "SELECT login FROM user WHERE uid=%d", uid);
290 zInfo = db_text("", "SELECT info FROM user WHERE uid=%d", uid);
291 zCap = db_text("", "SELECT cap FROM user WHERE uid=%d", uid);
292 if( strchr(zCap, 'a') ) oaa = " checked";
@@ -301,11 +298,10 @@
301 if( strchr(zCap, 'k') ) oak = " checked";
302 if( strchr(zCap, 'm') ) oam = " checked";
303 if( strchr(zCap, 'n') ) oan = " checked";
304 if( strchr(zCap, 'o') ) oao = " checked";
305 if( strchr(zCap, 'p') ) oap = " checked";
306 if( strchr(zCap, 'q') ) oaq = " checked";
307 if( strchr(zCap, 'r') ) oar = " checked";
308 if( strchr(zCap, 's') ) oas = " checked";
309 if( strchr(zCap, 't') ) oat = " checked";
310 if( strchr(zCap, 'w') ) oaw = " checked";
311 }
@@ -345,11 +341,10 @@
345 }
346 @ <input type="checkbox" name="aa"%s(oaa)>Admin</input><br>
347 @ <input type="checkbox" name="ad"%s(oad)>Delete</input><br>
348 @ <input type="checkbox" name="ae"%s(oad)>Email</input><br>
349 @ <input type="checkbox" name="ap"%s(oap)>Password</input><br>
350 @ <input type="checkbox" name="aq"%s(oaq)>Query</input><br>
351 @ <input type="checkbox" name="ai"%s(oai)>Check-In</input><br>
352 @ <input type="checkbox" name="ao"%s(oao)>Check-Out</input><br>
353 @ <input type="checkbox" name="ah"%s(oah)>History</input><br>
354 @ <input type="checkbox" name="ag"%s(oag)>Clone</input><br>
355 @ <input type="checkbox" name="aj"%s(oaj)>Read Wiki</input><br>
@@ -390,16 +385,10 @@
390 @ users. This capability is intended for deletion of spam. The
391 @ delete capability is only in effect for 24 hours after the item
392 @ is first posted. The Setup user can delete anything at any time.
393 @ </p></li>
394 @
395 @ <li><p>
396 @ The <b>Query</b> privilege allows the user to create or edit
397 @ report formats by specifying appropriate SQL. Users can run
398 @ existing reports without the Query privilege.
399 @ </p></li>
400 @
401 @ <li><p>
402 @ An <b>Admin</b> user can add other users, create new ticket report
403 @ formats, and change system defaults. But only the <b>Setup</b> user
404 @ is able to change the repository to
405 @ which this program is linked.
@@ -409,10 +398,19 @@
409 @ The <b>History</b> privilege allows a user to see a timeline
410 @ with hyperlinks to version information, to download ZIP archives
411 @ of individual versions.
412 @ </p></li>
413 @
 
 
 
 
 
 
 
 
 
414 @ <li><p>
415 @ No login is required for user "<b>nobody</b>". The capabilities
416 @ of this user are available to anyone without supplying a username or
417 @ password. To disable nobody access, make sure there is no user
418 @ with an ID of <b>nobody</b> or that the nobody user has no
419
--- src/setup.c
+++ src/setup.c
@@ -147,11 +147,10 @@
147 @ <li value="11"><b>Write-Wiki</b>: Edit wiki pages</li>
148 @ <li value="13"><b>Append-Wiki</b>: Append to wiki pages</li>
149 @ <li value="14"><b>New-Tkt</b>: Create new tickets</li>
150 @ <li value="15"><b>Check-Out</b>: Check out versions</li>
151 @ <li value="16"><b>Password</b>: Change your own password</li>
 
152 @ <li value="18"><b>Read-Tkt</b>: View tickets</li>
153 @ <li value="19"><b>Setup:</b> Setup and configure this website</li>
154 @ <li value="20"><b>Tkt-Report:</b> Create new bug summary reports</li>
155 @ <li value="23"><b>Write-Tkt</b>: Edit tickets</li>
156 @ </ol>
@@ -173,11 +172,11 @@
172 ** WEBPAGE: /setup_uedit
173 */
174 void user_edit(void){
175 const char *zId, *zLogin, *zInfo, *zCap;
176 char *oaa, *oas, *oar, *oaw, *oan, *oai, *oaj, *oao, *oap;
177 char *oak, *oad, *oac, *oaf, *oam, *oah, *oag, *oae;
178 char *oat;
179 int doWrite;
180 int uid;
181 int higherUser = 0; /* True if user being edited is SETUP and the */
182 /* user doing the editing is ADMIN. Disallow editing */
@@ -220,11 +219,10 @@
219 int aj = P("aj")!=0;
220 int ak = P("ak")!=0;
221 int an = P("an")!=0;
222 int ao = P("ao")!=0;
223 int ap = P("ap")!=0;
 
224 int ar = P("ar")!=0;
225 int as = g.okSetup && P("as")!=0;
226 int aw = P("aw")!=0;
227 int ac = P("ac")!=0;
228 int af = P("af")!=0;
@@ -244,11 +242,10 @@
242 if( ak ){ zCap[i++] = 'k'; }
243 if( am ){ zCap[i++] = 'm'; }
244 if( an ){ zCap[i++] = 'n'; }
245 if( ao ){ zCap[i++] = 'o'; }
246 if( ap ){ zCap[i++] = 'p'; }
 
247 if( ar ){ zCap[i++] = 'r'; }
248 if( as ){ zCap[i++] = 's'; }
249 if( at ){ zCap[i++] = 't'; }
250 if( aw ){ zCap[i++] = 'w'; }
251
@@ -282,11 +279,11 @@
279 */
280 zLogin = "";
281 zInfo = "";
282 zCap = "";
283 oaa = oac = oad = oae = oaf = oag = oah = oai = oaj = oak = oam =
284 oan = oao = oap = oar = oas = oat = oaw = "";
285 if( uid ){
286 zLogin = db_text("", "SELECT login FROM user WHERE uid=%d", uid);
287 zInfo = db_text("", "SELECT info FROM user WHERE uid=%d", uid);
288 zCap = db_text("", "SELECT cap FROM user WHERE uid=%d", uid);
289 if( strchr(zCap, 'a') ) oaa = " checked";
@@ -301,11 +298,10 @@
298 if( strchr(zCap, 'k') ) oak = " checked";
299 if( strchr(zCap, 'm') ) oam = " checked";
300 if( strchr(zCap, 'n') ) oan = " checked";
301 if( strchr(zCap, 'o') ) oao = " checked";
302 if( strchr(zCap, 'p') ) oap = " checked";
 
303 if( strchr(zCap, 'r') ) oar = " checked";
304 if( strchr(zCap, 's') ) oas = " checked";
305 if( strchr(zCap, 't') ) oat = " checked";
306 if( strchr(zCap, 'w') ) oaw = " checked";
307 }
@@ -345,11 +341,10 @@
341 }
342 @ <input type="checkbox" name="aa"%s(oaa)>Admin</input><br>
343 @ <input type="checkbox" name="ad"%s(oad)>Delete</input><br>
344 @ <input type="checkbox" name="ae"%s(oad)>Email</input><br>
345 @ <input type="checkbox" name="ap"%s(oap)>Password</input><br>
 
346 @ <input type="checkbox" name="ai"%s(oai)>Check-In</input><br>
347 @ <input type="checkbox" name="ao"%s(oao)>Check-Out</input><br>
348 @ <input type="checkbox" name="ah"%s(oah)>History</input><br>
349 @ <input type="checkbox" name="ag"%s(oag)>Clone</input><br>
350 @ <input type="checkbox" name="aj"%s(oaj)>Read Wiki</input><br>
@@ -390,16 +385,10 @@
385 @ users. This capability is intended for deletion of spam. The
386 @ delete capability is only in effect for 24 hours after the item
387 @ is first posted. The Setup user can delete anything at any time.
388 @ </p></li>
389 @
 
 
 
 
 
 
390 @ <li><p>
391 @ An <b>Admin</b> user can add other users, create new ticket report
392 @ formats, and change system defaults. But only the <b>Setup</b> user
393 @ is able to change the repository to
394 @ which this program is linked.
@@ -409,10 +398,19 @@
398 @ The <b>History</b> privilege allows a user to see a timeline
399 @ with hyperlinks to version information, to download ZIP archives
400 @ of individual versions.
401 @ </p></li>
402 @
403 @ <li><p>
404 @ The <b>Read Wiki</b>, <b>New Wiki</b>, <b>Append Wiki</b>, and
405 @ <b>Write Wiki</b> privileges control access to wiki pages. The
406 @ <b>Read Tkt</b>, <b>New Tkt</b>, <b>Append Tkt</b>, and
407 @ <b>Write Tkt</b> privileges control access to trouble tickets.
408 @ The <b>Tkt Report</b> privilege allows the user to create or edit
409 @ ticket report formats.
410 @ </p></li>
411 @
412 @ <li><p>
413 @ No login is required for user "<b>nobody</b>". The capabilities
414 @ of this user are available to anyone without supplying a username or
415 @ password. To disable nobody access, make sure there is no user
416 @ with an ID of <b>nobody</b> or that the nobody user has no
417
+1 -1
--- src/style.c
+++ src/style.c
@@ -182,11 +182,11 @@
182182
@ if {[hascap o]} {
183183
@ html "<a href='$baseurl/leaves'>Leaves</a>"
184184
@ html "<a href='$baseurl/timeline'>Timeline</a>"
185185
@ # html "<a href='$baseurl/tagview'>Tags</a>"
186186
@ }
187
-@ if {[hascap hr]} {
187
+@ if {[hascap r]} {
188188
@ html "<a href='$baseurl/reportlist'>Bugs</a>"
189189
@ }
190190
@ if {[hascap j]} {
191191
@ html "<a href='$baseurl/wiki'>Wiki</a>"
192192
@ }
193193
--- src/style.c
+++ src/style.c
@@ -182,11 +182,11 @@
182 @ if {[hascap o]} {
183 @ html "<a href='$baseurl/leaves'>Leaves</a>"
184 @ html "<a href='$baseurl/timeline'>Timeline</a>"
185 @ # html "<a href='$baseurl/tagview'>Tags</a>"
186 @ }
187 @ if {[hascap hr]} {
188 @ html "<a href='$baseurl/reportlist'>Bugs</a>"
189 @ }
190 @ if {[hascap j]} {
191 @ html "<a href='$baseurl/wiki'>Wiki</a>"
192 @ }
193
--- src/style.c
+++ src/style.c
@@ -182,11 +182,11 @@
182 @ if {[hascap o]} {
183 @ html "<a href='$baseurl/leaves'>Leaves</a>"
184 @ html "<a href='$baseurl/timeline'>Timeline</a>"
185 @ # html "<a href='$baseurl/tagview'>Tags</a>"
186 @ }
187 @ if {[hascap r]} {
188 @ html "<a href='$baseurl/reportlist'>Bugs</a>"
189 @ }
190 @ if {[hascap j]} {
191 @ html "<a href='$baseurl/wiki'>Wiki</a>"
192 @ }
193
+1
--- src/wiki.c
+++ src/wiki.c
@@ -89,10 +89,11 @@
8989
g.okWrWiki = 0;
9090
g.okHistory = 0;
9191
wiki_page();
9292
return;
9393
}
94
+ login_check_credentials();
9495
style_header("Home");
9596
@ <p>This is a stub home-page for the project.
9697
@ To fill in this page, first go to
9798
@ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
9899
@ and establish a "Project Name". Then create a
99100
--- src/wiki.c
+++ src/wiki.c
@@ -89,10 +89,11 @@
89 g.okWrWiki = 0;
90 g.okHistory = 0;
91 wiki_page();
92 return;
93 }
 
94 style_header("Home");
95 @ <p>This is a stub home-page for the project.
96 @ To fill in this page, first go to
97 @ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
98 @ and establish a "Project Name". Then create a
99
--- src/wiki.c
+++ src/wiki.c
@@ -89,10 +89,11 @@
89 g.okWrWiki = 0;
90 g.okHistory = 0;
91 wiki_page();
92 return;
93 }
94 login_check_credentials();
95 style_header("Home");
96 @ <p>This is a stub home-page for the project.
97 @ To fill in this page, first go to
98 @ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
99 @ and establish a "Project Name". Then create a
100

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button