Fossil SCM
The /chat page now redirects to the login page if needed.
Commit
77d30586005fc1207c265a8ff15952b0ea68750df317abe10d71cf89fcc2acd7
Parent
68da24594ff5cb7…
1 file changed
+2
-6
+2
-6
| --- src/chat.c | ||
| +++ src/chat.c | ||
| @@ -75,19 +75,15 @@ | ||
| 75 | 75 | ** |
| 76 | 76 | ** Start up a browser-based chat session. |
| 77 | 77 | */ |
| 78 | 78 | void chat_webpage(void){ |
| 79 | 79 | login_check_credentials(); |
| 80 | - style_set_current_feature("chat"); | |
| 81 | 80 | if( !g.perm.Chat ){ |
| 82 | - style_header("Chat Not Authorized"); | |
| 83 | - @ <h1>Not Authorized</h1> | |
| 84 | - @ <p>You do not have permission to use the chatroom on this | |
| 85 | - @ repository.</p> | |
| 86 | - style_finish_page(); | |
| 81 | + login_needed(g.anon.Chat); | |
| 87 | 82 | return; |
| 88 | 83 | } |
| 84 | + style_set_current_feature("chat"); | |
| 89 | 85 | style_header("Chat"); |
| 90 | 86 | @ <style> |
| 91 | 87 | @ #dialog { |
| 92 | 88 | @ width: 97%%; |
| 93 | 89 | @ } |
| 94 | 90 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -75,19 +75,15 @@ | |
| 75 | ** |
| 76 | ** Start up a browser-based chat session. |
| 77 | */ |
| 78 | void chat_webpage(void){ |
| 79 | login_check_credentials(); |
| 80 | style_set_current_feature("chat"); |
| 81 | if( !g.perm.Chat ){ |
| 82 | style_header("Chat Not Authorized"); |
| 83 | @ <h1>Not Authorized</h1> |
| 84 | @ <p>You do not have permission to use the chatroom on this |
| 85 | @ repository.</p> |
| 86 | style_finish_page(); |
| 87 | return; |
| 88 | } |
| 89 | style_header("Chat"); |
| 90 | @ <style> |
| 91 | @ #dialog { |
| 92 | @ width: 97%%; |
| 93 | @ } |
| 94 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -75,19 +75,15 @@ | |
| 75 | ** |
| 76 | ** Start up a browser-based chat session. |
| 77 | */ |
| 78 | void chat_webpage(void){ |
| 79 | login_check_credentials(); |
| 80 | if( !g.perm.Chat ){ |
| 81 | login_needed(g.anon.Chat); |
| 82 | return; |
| 83 | } |
| 84 | style_set_current_feature("chat"); |
| 85 | style_header("Chat"); |
| 86 | @ <style> |
| 87 | @ #dialog { |
| 88 | @ width: 97%%; |
| 89 | @ } |
| 90 |