Fossil SCM

Require history permission in order to clone.

drh 2007-08-09 10:43 trunk
Commit 13b7ac16e4e5aee70bbcb3958c9047f846e15974
+1 -1
--- src/clone.c
+++ src/clone.c
@@ -53,11 +53,11 @@
5353
db_set("last-sync-url", g.argv[2]);
5454
}
5555
db_multi_exec(
5656
"INSERT INTO config(name,value) VALUES('server-code', hex(randomblob(20)));"
5757
);
58
- if( g.urlIsFile ){
58
+ if( g.urlIsFile ){
5959
Stmt q;
6060
db_multi_exec("ATTACH DATABASE %Q AS orig", g.urlName);
6161
db_begin_transaction();
6262
db_prepare(&q,
6363
"SELECT name FROM orig.sqlite_master"
6464
--- src/clone.c
+++ src/clone.c
@@ -53,11 +53,11 @@
53 db_set("last-sync-url", g.argv[2]);
54 }
55 db_multi_exec(
56 "INSERT INTO config(name,value) VALUES('server-code', hex(randomblob(20)));"
57 );
58 if( g.urlIsFile ){
59 Stmt q;
60 db_multi_exec("ATTACH DATABASE %Q AS orig", g.urlName);
61 db_begin_transaction();
62 db_prepare(&q,
63 "SELECT name FROM orig.sqlite_master"
64
--- src/clone.c
+++ src/clone.c
@@ -53,11 +53,11 @@
53 db_set("last-sync-url", g.argv[2]);
54 }
55 db_multi_exec(
56 "INSERT INTO config(name,value) VALUES('server-code', hex(randomblob(20)));"
57 );
58 if( g.urlIsFile ){
59 Stmt q;
60 db_multi_exec("ATTACH DATABASE %Q AS orig", g.urlName);
61 db_begin_transaction();
62 db_prepare(&q,
63 "SELECT name FROM orig.sqlite_master"
64
--- src/setup.c
+++ src/setup.c
@@ -370,10 +370,16 @@
370370
@ formats, and change system defaults. But only the <b>Setup</b> user
371371
@ is able to change the repository to
372372
@ which this program is linked.
373373
@ </p></li>
374374
@
375
+ @ <li><p>
376
+ @ The <b>History</b> privilege allows a user to see a timeline
377
+ @ with hyperlinks to version information, to download ZIP archives
378
+ @ of individual versions, and to clone the repository.
379
+ @ </p></li>
380
+ @
375381
@ <li><p>
376382
@ No login is required for user "<b>nobody</b>". The capabilities
377383
@ of this user are available to anyone without supplying a username or
378384
@ password. To disable nobody access, make sure there is no user
379385
@ with an ID of <b>nobody</b> or that the nobody user has no
380386
--- src/setup.c
+++ src/setup.c
@@ -370,10 +370,16 @@
370 @ formats, and change system defaults. But only the <b>Setup</b> user
371 @ is able to change the repository to
372 @ which this program is linked.
373 @ </p></li>
374 @
 
 
 
 
 
 
375 @ <li><p>
376 @ No login is required for user "<b>nobody</b>". The capabilities
377 @ of this user are available to anyone without supplying a username or
378 @ password. To disable nobody access, make sure there is no user
379 @ with an ID of <b>nobody</b> or that the nobody user has no
380
--- src/setup.c
+++ src/setup.c
@@ -370,10 +370,16 @@
370 @ formats, and change system defaults. But only the <b>Setup</b> user
371 @ is able to change the repository to
372 @ which this program is linked.
373 @ </p></li>
374 @
375 @ <li><p>
376 @ The <b>History</b> privilege allows a user to see a timeline
377 @ with hyperlinks to version information, to download ZIP archives
378 @ of individual versions, and to clone the repository.
379 @ </p></li>
380 @
381 @ <li><p>
382 @ No login is required for user "<b>nobody</b>". The capabilities
383 @ of this user are available to anyone without supplying a username or
384 @ password. To disable nobody access, make sure there is no user
385 @ with an ID of <b>nobody</b> or that the nobody user has no
386
+2 -2
--- src/xfer.c
+++ src/xfer.c
@@ -457,13 +457,13 @@
457457
**
458458
** The client knows nothing. Tell all.
459459
*/
460460
if( blob_eq(&aToken[0], "clone") ){
461461
login_check_credentials();
462
- if( !g.okRead ){
462
+ if( !g.okRead || !g.okHistory ){
463463
cgi_reset_content();
464
- @ error not\sauthorized\sto\sread
464
+ @ error not\sauthorized\sto\sclone
465465
nErr++;
466466
break;
467467
}
468468
isPull = 1;
469469
@ push %s(db_get("server-code", "x")) %s(db_get("project-code", "x"))
470470
--- src/xfer.c
+++ src/xfer.c
@@ -457,13 +457,13 @@
457 **
458 ** The client knows nothing. Tell all.
459 */
460 if( blob_eq(&aToken[0], "clone") ){
461 login_check_credentials();
462 if( !g.okRead ){
463 cgi_reset_content();
464 @ error not\sauthorized\sto\sread
465 nErr++;
466 break;
467 }
468 isPull = 1;
469 @ push %s(db_get("server-code", "x")) %s(db_get("project-code", "x"))
470
--- src/xfer.c
+++ src/xfer.c
@@ -457,13 +457,13 @@
457 **
458 ** The client knows nothing. Tell all.
459 */
460 if( blob_eq(&aToken[0], "clone") ){
461 login_check_credentials();
462 if( !g.okRead || !g.okHistory ){
463 cgi_reset_content();
464 @ error not\sauthorized\sto\sclone
465 nErr++;
466 break;
467 }
468 isPull = 1;
469 @ push %s(db_get("server-code", "x")) %s(db_get("project-code", "x"))
470

Keyboard Shortcuts

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