Compare commits

...

5 Commits

Author SHA1 Message Date
c55f9743aa Merge pull request 'allow-vorstand-to-send-things' (#600) from allow-vorstand-to-send-things into staging
Some checks failed
CI/CD Pipeline / test (push) Failing after 1m40s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #600
2024-06-21 11:15:30 +02:00
76290a64ae allow vorstand to send mail + notifications
Some checks failed
CI/CD Pipeline / test (push) Failing after 1m50s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2024-06-21 11:14:48 +02:00
4b48fbaa82 Merge pull request 'update deps' (#599) from update-deps into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m39s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 18m11s
Reviewed-on: #599
2024-06-19 13:44:08 +02:00
dfa7be9928 Merge pull request 'fix migration' (#597) from fix-migration into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m13s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 6m26s
Reviewed-on: #597
2024-06-16 20:15:58 +02:00
1c04462c30 Merge pull request 'add more life to the mails :-)' (#595) from more-sympatic-welcome-mail into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m11s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 6m40s
Reviewed-on: #595
2024-06-15 18:28:24 +02:00
3 changed files with 13 additions and 13 deletions

View File

@ -16,7 +16,7 @@ use crate::tera::Config;
#[get("/mail")]
async fn index(
db: &State<SqlitePool>,
admin: AdminUser,
admin: VorstandUser,
flash: Option<FlashMessage<'_>>,
) -> Template {
let mut context = Context::new();
@ -65,7 +65,7 @@ async fn update(
db: &State<SqlitePool>,
data: Form<MailToSend<'_>>,
config: &State<Config>,
admin: AdminUser,
admin: VorstandUser,
) -> Flash<Redirect> {
let d = data.into_inner();
Log::create(db, format!("{admin:?} trying to send this mail: {d:?}")).await;

View File

@ -2,7 +2,7 @@ use crate::model::{
log::Log,
notification::Notification,
role::Role,
user::{AdminUser, User, UserWithDetails},
user::{AdminUser, User, UserWithDetails, VorstandUser},
};
use itertools::Itertools;
use rocket::{
@ -18,7 +18,7 @@ use sqlx::SqlitePool;
#[get("/notification")]
async fn index(
db: &State<SqlitePool>,
user: AdminUser,
user: VorstandUser,
flash: Option<FlashMessage<'_>>,
) -> Template {
let mut context = Context::new();
@ -62,7 +62,7 @@ pub struct NotificationToSendUser {
async fn send_group(
db: &State<SqlitePool>,
data: Form<NotificationToSendGroup>,
admin: AdminUser,
admin: VorstandUser,
) -> Flash<Redirect> {
let d = data.into_inner();
Log::create(
@ -89,7 +89,7 @@ async fn send_group(
async fn send_user(
db: &State<SqlitePool>,
data: Form<NotificationToSendUser>,
admin: AdminUser,
admin: VorstandUser,
) -> Flash<Redirect> {
let d = data.into_inner();
Log::create(

View File

@ -155,6 +155,13 @@
<a href="/board/boathouse"
class="block w-100 py-2 hover:text-primary-600">Bootshaus</a>
</li>
<li class="py-1">
<a href="/admin/mail" class="block w-100 py-2 hover:text-primary-600">Mail ausschicken</a>
</li>
<li class="py-1">
<a href="/admin/notification"
class="block w-100 py-2 hover:text-primary-600">Nachricht ausschreiben</a>
</li>
</ul>
</div>
{% endif %}
@ -169,19 +176,12 @@
<li class="py-1">
<a href="/admin/user" class="block w-100 py-2 hover:text-primary-600">User</a>
</li>
<li class="py-1">
<a href="/admin/mail" class="block w-100 py-2 hover:text-primary-600">Mail</a>
</li>
<li class="py-1">
<a href="/admin/rss" class="block w-100 py-2 hover:text-primary-600">Logs</a>
</li>
<li class="py-1">
<a href="/admin/list" class="block w-100 py-2 hover:text-primary-600">Fingerabdruck-Liste überprüfen</a>
</li>
<li class="py-1">
<a href="/admin/notification"
class="block w-100 py-2 hover:text-primary-600">Nachricht ausschreiben</a>
</li>
</ul>
</div>
{% endif %}