| | @@ -269,10 +269,11 @@ |
| 269 | 269 | ** modified user record. After writing the user record, redirect |
| 270 | 270 | ** to the page that displays a list of users. |
| 271 | 271 | */ |
| 272 | 272 | doWrite = cgi_all("login","info","pw") && !higherUser; |
| 273 | 273 | if( doWrite ){ |
| 274 | + char const * anonLoginCheckedbox = PD("anonymousEnableAutofill",0); |
| 274 | 275 | char zCap[50]; |
| 275 | 276 | int i = 0; |
| 276 | 277 | int aa = P("aa")!=0; |
| 277 | 278 | int ad = P("ad")!=0; |
| 278 | 279 | int ae = P("ae")!=0; |
| | @@ -337,10 +338,16 @@ |
| 337 | 338 | db_multi_exec( |
| 338 | 339 | "REPLACE INTO user(uid,login,info,pw,cap) " |
| 339 | 340 | "VALUES(nullif(%d,0),%Q,%Q,%Q,'%s')", |
| 340 | 341 | uid, P("login"), P("info"), zPw, zCap |
| 341 | 342 | ); |
| 343 | + if( anonLoginCheckedbox && (*anonLoginCheckedbox) ){ |
| 344 | + db_set( "anon-login-enable-captcha-filler", "on", 0 ); |
| 345 | + } |
| 346 | + else{ |
| 347 | + db_set( "anon-login-enable-captcha-filler", "off", 0 ); |
| 348 | + } |
| 342 | 349 | cgi_redirect("setup_ulist"); |
| 343 | 350 | return; |
| 344 | 351 | } |
| 345 | 352 | |
| 346 | 353 | /* Load the existing information about the user, if any |
| | @@ -445,39 +452,43 @@ |
| 445 | 452 | @ <tr> |
| 446 | 453 | @ <td align="right" valign="top">Capabilities:</td> |
| 447 | 454 | @ <td> |
| 448 | 455 | #define B(x) inherit[x] |
| 449 | 456 | if( g.okSetup ){ |
| 450 | | - @ <input type="checkbox" name="as"%s(oas)>%s(B('s'))Setup</input><br> |
| 451 | | - } |
| 452 | | - @ <input type="checkbox" name="aa"%s(oaa)>%s(B('a'))Admin</input><br> |
| 453 | | - @ <input type="checkbox" name="ad"%s(oad)>%s(B('d'))Delete</input><br> |
| 454 | | - @ <input type="checkbox" name="ae"%s(oae)>%s(B('e'))Email</input><br> |
| 455 | | - @ <input type="checkbox" name="ap"%s(oap)>%s(B('p'))Password</input><br> |
| 456 | | - @ <input type="checkbox" name="ai"%s(oai)>%s(B('i'))Check-In</input><br> |
| 457 | | - @ <input type="checkbox" name="ao"%s(oao)>%s(B('o'))Check-Out</input><br> |
| 458 | | - @ <input type="checkbox" name="ah"%s(oah)>%s(B('h'))History</input><br> |
| 459 | | - @ <input type="checkbox" name="au"%s(oau)>%s(B('u'))Reader</input><br> |
| 460 | | - @ <input type="checkbox" name="av"%s(oav)>%s(B('v'))Developer</input><br> |
| 461 | | - @ <input type="checkbox" name="ag"%s(oag)>%s(B('g'))Clone</input><br> |
| 462 | | - @ <input type="checkbox" name="aj"%s(oaj)>%s(B('j'))Read Wiki</input><br> |
| 463 | | - @ <input type="checkbox" name="af"%s(oaf)>%s(B('f'))New Wiki</input><br> |
| 464 | | - @ <input type="checkbox" name="am"%s(oam)>%s(B('m'))Append Wiki</input><br> |
| 465 | | - @ <input type="checkbox" name="ak"%s(oak)>%s(B('k'))Write Wiki</input><br> |
| 466 | | - @ <input type="checkbox" name="ar"%s(oar)>%s(B('r'))Read Tkt</input><br> |
| 467 | | - @ <input type="checkbox" name="an"%s(oan)>%s(B('n'))New Tkt</input><br> |
| 468 | | - @ <input type="checkbox" name="ac"%s(oac)>%s(B('c'))Append Tkt</input><br> |
| 469 | | - @ <input type="checkbox" name="aw"%s(oaw)>%s(B('w'))Write Tkt</input><br> |
| 470 | | - @ <input type="checkbox" name="at"%s(oat)>%s(B('t'))Tkt Report</input><br> |
| 471 | | - @ <input type="checkbox" name="az"%s(oaz)>%s(B('z'))Download Zip</input> |
| 457 | + @ <input type="checkbox" name="as"%s(oas)/>%s(B('s'))Setup<br> |
| 458 | + } |
| 459 | + @ <input type="checkbox" name="aa"%s(oaa)/>%s(B('a'))Admin<br> |
| 460 | + @ <input type="checkbox" name="ad"%s(oad)/>%s(B('d'))Delete<br> |
| 461 | + @ <input type="checkbox" name="ae"%s(oae)/>%s(B('e'))Email<br> |
| 462 | + @ <input type="checkbox" name="ap"%s(oap)/>%s(B('p'))Password<br> |
| 463 | + @ <input type="checkbox" name="ai"%s(oai)/>%s(B('i'))Check-In<br> |
| 464 | + @ <input type="checkbox" name="ao"%s(oao)/>%s(B('o'))Check-Out<br> |
| 465 | + @ <input type="checkbox" name="ah"%s(oah)/>%s(B('h'))History<br> |
| 466 | + @ <input type="checkbox" name="au"%s(oau)/>%s(B('u'))Reader<br> |
| 467 | + @ <input type="checkbox" name="av"%s(oav)/>%s(B('v'))Developer<br> |
| 468 | + @ <input type="checkbox" name="ag"%s(oag)/>%s(B('g'))Clone<br> |
| 469 | + @ <input type="checkbox" name="aj"%s(oaj)/>%s(B('j'))Read Wiki<br> |
| 470 | + @ <input type="checkbox" name="af"%s(oaf)/>%s(B('f'))New Wiki<br> |
| 471 | + @ <input type="checkbox" name="am"%s(oam)/>%s(B('m'))Append Wiki<br> |
| 472 | + @ <input type="checkbox" name="ak"%s(oak)/>%s(B('k'))Write Wiki<br> |
| 473 | + @ <input type="checkbox" name="ar"%s(oar)/>%s(B('r'))Read Tkt<br> |
| 474 | + @ <input type="checkbox" name="an"%s(oan)/>%s(B('n'))New Tkt<br> |
| 475 | + @ <input type="checkbox" name="ac"%s(oac)/>%s(B('c'))Append Tkt<br> |
| 476 | + @ <input type="checkbox" name="aw"%s(oaw)/>%s(B('w'))Write Tkt<br> |
| 477 | + @ <input type="checkbox" name="at"%s(oat)/>%s(B('t'))Tkt Report<br> |
| 478 | + @ <input type="checkbox" name="az"%s(oaz)/>%s(B('z'))Download Zip |
| 472 | 479 | @ </td> |
| 473 | 480 | @ </tr> |
| 474 | 481 | @ <tr> |
| 475 | 482 | @ <td align="right">Password:</td> |
| 476 | 483 | if( strcmp(zLogin, "anonymous")==0 ){ |
| 484 | + int enabled = db_get_boolean( "anon-login-enable-captcha-filler", 0 ); |
| 485 | + char const * checked = enabled ? "checked=\"checked\"" : ""; |
| 477 | 486 | /* User the password for "anonymous" as cleartext */ |
| 478 | | - @ <td><input type="text" name="pw" value="%h(zPw)"></td> |
| 487 | + @ <td><input type="text" name="pw" value="%h(zPw)"/> |
| 488 | + @ <br/>Enable password-filler button for anonymous login? <input type="checkbox" name="anonymousEnableAutofill" %s(checked)/><br/> |
| 489 | + @ </td> |
| 479 | 490 | }else if( zPw[0] ){ |
| 480 | 491 | /* Obscure the password for all other users */ |
| 481 | 492 | @ <td><input type="password" name="pw" value="**********"></td> |
| 482 | 493 | }else{ |
| 483 | 494 | /* Show an empty password as an empty input field */ |
| | @@ -618,11 +629,11 @@ |
| 618 | 629 | @ with check-in privileges. When adding new trusted users, simply |
| 619 | 630 | @ select the <b>Developer</b> privilege to cause the new user to inherit |
| 620 | 631 | @ all privileges of the "developer" user. Similarly, the "<b>reader</b>" |
| 621 | 632 | @ user is a template for users who are allowed more access than anonymous, |
| 622 | 633 | @ but less than a developer. |
| 623 | | - @ </li></p> |
| 634 | + @ </p></li> |
| 624 | 635 | @ </ul> |
| 625 | 636 | @ </form> |
| 626 | 637 | style_footer(); |
| 627 | 638 | } |
| 628 | 639 | |
| 629 | 640 | |