Compare commits

..

No commits in common. "c55f9743aa404e688096787afa7ac152da7dd1bd" and "d25cd491d09b7efa09b85d576eccc8508663d939" have entirely different histories.

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: VorstandUser,
admin: AdminUser,
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: VorstandUser,
admin: AdminUser,
) -> 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, VorstandUser},
user::{AdminUser, User, UserWithDetails},
};
use itertools::Itertools;
use rocket::{
@ -18,7 +18,7 @@ use sqlx::SqlitePool;
#[get("/notification")]
async fn index(
db: &State<SqlitePool>,
user: VorstandUser,
user: AdminUser,
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: VorstandUser,
admin: AdminUser,
) -> 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: VorstandUser,
admin: AdminUser,
) -> Flash<Redirect> {
let d = data.into_inner();
Log::create(

View File

@ -155,13 +155,6 @@
<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 %}
@ -176,12 +169,19 @@
<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 %}