Fossil SCM
Fix errors in the permission checking for email notification.
Commit
c286157cc9546a7c519a74ef376d61a76fc81c3b25fb43806dd4d8d8412b1760
Parent
72bb00bcab1d5a2…
1 file changed
+2
-2
+2
-2
| --- src/email.c | ||
| +++ src/email.c | ||
| @@ -2051,21 +2051,21 @@ | ||
| 2051 | 2051 | const char *zEmail = db_column_text(&q, 1); |
| 2052 | 2052 | const char *zCap = db_column_text(&q, 3); |
| 2053 | 2053 | int nHit = 0; |
| 2054 | 2054 | for(p=pEvents; p; p=p->pNext){ |
| 2055 | 2055 | if( strchr(zSub,p->type)==0 ) continue; |
| 2056 | - if( strchr(zSub,'s')!=0 || strchr(zSub,'a')!=0 ){ | |
| 2056 | + if( strchr(zCap,'s')!=0 || strchr(zCap,'a')!=0 ){ | |
| 2057 | 2057 | /* Setup and admin users can get any notification */ |
| 2058 | 2058 | }else{ |
| 2059 | 2059 | char xType = '*'; |
| 2060 | 2060 | switch( p->type ){ |
| 2061 | 2061 | case 'c': xType = 'o'; break; |
| 2062 | 2062 | case 'f': xType = '2'; break; |
| 2063 | 2063 | case 't': xType = 'r'; break; |
| 2064 | 2064 | case 'w': xType = 'j'; break; |
| 2065 | 2065 | } |
| 2066 | - if( strchr(zSub,xType)==0 ) continue; | |
| 2066 | + if( strchr(zCap,xType)==0 ) continue; | |
| 2067 | 2067 | } |
| 2068 | 2068 | if( nHit==0 ){ |
| 2069 | 2069 | blob_appendf(&hdr,"To: <%s>\r\n", zEmail); |
| 2070 | 2070 | blob_appendf(&hdr,"Subject: %s activity alert\r\n", zRepoName); |
| 2071 | 2071 | blob_appendf(&body, |
| 2072 | 2072 |
| --- src/email.c | |
| +++ src/email.c | |
| @@ -2051,21 +2051,21 @@ | |
| 2051 | const char *zEmail = db_column_text(&q, 1); |
| 2052 | const char *zCap = db_column_text(&q, 3); |
| 2053 | int nHit = 0; |
| 2054 | for(p=pEvents; p; p=p->pNext){ |
| 2055 | if( strchr(zSub,p->type)==0 ) continue; |
| 2056 | if( strchr(zSub,'s')!=0 || strchr(zSub,'a')!=0 ){ |
| 2057 | /* Setup and admin users can get any notification */ |
| 2058 | }else{ |
| 2059 | char xType = '*'; |
| 2060 | switch( p->type ){ |
| 2061 | case 'c': xType = 'o'; break; |
| 2062 | case 'f': xType = '2'; break; |
| 2063 | case 't': xType = 'r'; break; |
| 2064 | case 'w': xType = 'j'; break; |
| 2065 | } |
| 2066 | if( strchr(zSub,xType)==0 ) continue; |
| 2067 | } |
| 2068 | if( nHit==0 ){ |
| 2069 | blob_appendf(&hdr,"To: <%s>\r\n", zEmail); |
| 2070 | blob_appendf(&hdr,"Subject: %s activity alert\r\n", zRepoName); |
| 2071 | blob_appendf(&body, |
| 2072 |
| --- src/email.c | |
| +++ src/email.c | |
| @@ -2051,21 +2051,21 @@ | |
| 2051 | const char *zEmail = db_column_text(&q, 1); |
| 2052 | const char *zCap = db_column_text(&q, 3); |
| 2053 | int nHit = 0; |
| 2054 | for(p=pEvents; p; p=p->pNext){ |
| 2055 | if( strchr(zSub,p->type)==0 ) continue; |
| 2056 | if( strchr(zCap,'s')!=0 || strchr(zCap,'a')!=0 ){ |
| 2057 | /* Setup and admin users can get any notification */ |
| 2058 | }else{ |
| 2059 | char xType = '*'; |
| 2060 | switch( p->type ){ |
| 2061 | case 'c': xType = 'o'; break; |
| 2062 | case 'f': xType = '2'; break; |
| 2063 | case 't': xType = 'r'; break; |
| 2064 | case 'w': xType = 'j'; break; |
| 2065 | } |
| 2066 | if( strchr(zCap,xType)==0 ) continue; |
| 2067 | } |
| 2068 | if( nHit==0 ){ |
| 2069 | blob_appendf(&hdr,"To: <%s>\r\n", zEmail); |
| 2070 | blob_appendf(&hdr,"Subject: %s activity alert\r\n", zRepoName); |
| 2071 | blob_appendf(&body, |
| 2072 |