Fossil SCM
Setup and Admin users that are in the subscriber table were getting email alerts only if they had explicit moderator capabilities set. Those with bare "s" or "a" weren't getting notified.
Commit
1d3dd1d917acdae7f6e210fdce7176b614167637cd99a6fd551650768122b571
Parent
c720327afe19152…
1 file changed
+9
-6
+9
-6
| --- src/alerts.c | ||
| +++ src/alerts.c | ||
| @@ -2426,18 +2426,21 @@ | ||
| 2426 | 2426 | int nHit = 0; |
| 2427 | 2427 | for(p=pEvents; p; p=p->pNext){ |
| 2428 | 2428 | if( strchr(zSub,p->type)==0 ) continue; |
| 2429 | 2429 | if( p->needMod ){ |
| 2430 | 2430 | /* For events that require moderator approval, only send an alert |
| 2431 | - ** if the recipient is a moderator for that type of event */ | |
| 2431 | + ** if the recipient is a moderator for that type of event. Setup | |
| 2432 | + ** and Admin users always get notified. */ | |
| 2432 | 2433 | char xType = '*'; |
| 2433 | - switch( p->type ){ | |
| 2434 | - case 'f': xType = '5'; break; | |
| 2435 | - case 't': xType = 'q'; break; | |
| 2436 | - case 'w': xType = 'l'; break; | |
| 2434 | + if( strpbrk(zCap,"as")==0 ){ | |
| 2435 | + switch( p->type ){ | |
| 2436 | + case 'f': xType = '5'; break; | |
| 2437 | + case 't': xType = 'q'; break; | |
| 2438 | + case 'w': xType = 'l'; break; | |
| 2439 | + } | |
| 2440 | + if( strchr(zCap,xType)==0 ) continue; | |
| 2437 | 2441 | } |
| 2438 | - if( strchr(zCap,xType)==0 ) continue; | |
| 2439 | 2442 | }else if( strchr(zCap,'s')!=0 || strchr(zCap,'a')!=0 ){ |
| 2440 | 2443 | /* Setup and admin users can get any notification that does not |
| 2441 | 2444 | ** require moderation */ |
| 2442 | 2445 | }else{ |
| 2443 | 2446 | /* Other users only see the alert if they have sufficient |
| 2444 | 2447 |
| --- src/alerts.c | |
| +++ src/alerts.c | |
| @@ -2426,18 +2426,21 @@ | |
| 2426 | int nHit = 0; |
| 2427 | for(p=pEvents; p; p=p->pNext){ |
| 2428 | if( strchr(zSub,p->type)==0 ) continue; |
| 2429 | if( p->needMod ){ |
| 2430 | /* For events that require moderator approval, only send an alert |
| 2431 | ** if the recipient is a moderator for that type of event */ |
| 2432 | char xType = '*'; |
| 2433 | switch( p->type ){ |
| 2434 | case 'f': xType = '5'; break; |
| 2435 | case 't': xType = 'q'; break; |
| 2436 | case 'w': xType = 'l'; break; |
| 2437 | } |
| 2438 | if( strchr(zCap,xType)==0 ) continue; |
| 2439 | }else if( strchr(zCap,'s')!=0 || strchr(zCap,'a')!=0 ){ |
| 2440 | /* Setup and admin users can get any notification that does not |
| 2441 | ** require moderation */ |
| 2442 | }else{ |
| 2443 | /* Other users only see the alert if they have sufficient |
| 2444 |
| --- src/alerts.c | |
| +++ src/alerts.c | |
| @@ -2426,18 +2426,21 @@ | |
| 2426 | int nHit = 0; |
| 2427 | for(p=pEvents; p; p=p->pNext){ |
| 2428 | if( strchr(zSub,p->type)==0 ) continue; |
| 2429 | if( p->needMod ){ |
| 2430 | /* For events that require moderator approval, only send an alert |
| 2431 | ** if the recipient is a moderator for that type of event. Setup |
| 2432 | ** and Admin users always get notified. */ |
| 2433 | char xType = '*'; |
| 2434 | if( strpbrk(zCap,"as")==0 ){ |
| 2435 | switch( p->type ){ |
| 2436 | case 'f': xType = '5'; break; |
| 2437 | case 't': xType = 'q'; break; |
| 2438 | case 'w': xType = 'l'; break; |
| 2439 | } |
| 2440 | if( strchr(zCap,xType)==0 ) continue; |
| 2441 | } |
| 2442 | }else if( strchr(zCap,'s')!=0 || strchr(zCap,'a')!=0 ){ |
| 2443 | /* Setup and admin users can get any notification that does not |
| 2444 | ** require moderation */ |
| 2445 | }else{ |
| 2446 | /* Other users only see the alert if they have sufficient |
| 2447 |