Fossil SCM
add permission check in wiki_special_permission to account for the ticket namespace
Commit
0439daab73cafc4305031ca5de975f589084e8a9a045617b47166c10e093340c
Parent
f8c13b59b7715be…
1 file changed
+4
+4
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -531,15 +531,19 @@ | ||
| 531 | 531 | */ |
| 532 | 532 | static int wiki_special_permission(const char *zPageName){ |
| 533 | 533 | if( strncmp(zPageName,"branch/",7)!=0 |
| 534 | 534 | && strncmp(zPageName,"checkin/",8)!=0 |
| 535 | 535 | && strncmp(zPageName,"tag/",4)!=0 |
| 536 | + && strncmp(zPageName,"ticket/",7)!=0 | |
| 536 | 537 | ){ |
| 537 | 538 | return 1; |
| 538 | 539 | } |
| 539 | 540 | if( db_get_boolean("wiki-about",1)==0 ){ |
| 540 | 541 | return 1; |
| 542 | + } | |
| 543 | + if( strncmp(zPageName,"ticket/",7)==0 ){ | |
| 544 | + return g.perm.WrTkt; | |
| 541 | 545 | } |
| 542 | 546 | return g.perm.Write; |
| 543 | 547 | } |
| 544 | 548 | |
| 545 | 549 | /* |
| 546 | 550 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -531,15 +531,19 @@ | |
| 531 | */ |
| 532 | static int wiki_special_permission(const char *zPageName){ |
| 533 | if( strncmp(zPageName,"branch/",7)!=0 |
| 534 | && strncmp(zPageName,"checkin/",8)!=0 |
| 535 | && strncmp(zPageName,"tag/",4)!=0 |
| 536 | ){ |
| 537 | return 1; |
| 538 | } |
| 539 | if( db_get_boolean("wiki-about",1)==0 ){ |
| 540 | return 1; |
| 541 | } |
| 542 | return g.perm.Write; |
| 543 | } |
| 544 | |
| 545 | /* |
| 546 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -531,15 +531,19 @@ | |
| 531 | */ |
| 532 | static int wiki_special_permission(const char *zPageName){ |
| 533 | if( strncmp(zPageName,"branch/",7)!=0 |
| 534 | && strncmp(zPageName,"checkin/",8)!=0 |
| 535 | && strncmp(zPageName,"tag/",4)!=0 |
| 536 | && strncmp(zPageName,"ticket/",7)!=0 |
| 537 | ){ |
| 538 | return 1; |
| 539 | } |
| 540 | if( db_get_boolean("wiki-about",1)==0 ){ |
| 541 | return 1; |
| 542 | } |
| 543 | if( strncmp(zPageName,"ticket/",7)==0 ){ |
| 544 | return g.perm.WrTkt; |
| 545 | } |
| 546 | return g.perm.Write; |
| 547 | } |
| 548 | |
| 549 | /* |
| 550 |