💥 (admin): Exige un permiso propio en cada página
This commit is contained in:
parent
2299e63585
commit
f337119219
6 changed files with 31 additions and 79 deletions
|
|
@ -50,7 +50,7 @@ fn declare_pages(bag: &mut PageBag) {
|
|||
title: Lc::n("My App"),
|
||||
description: Some(Lc::n("Configure My App.")),
|
||||
weight: 0,
|
||||
permission: Some(&MyPermission::Config),
|
||||
permission: &MyPermission::Config,
|
||||
kind: AdminPageKind::View,
|
||||
});
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ enum MyPermission {
|
|||
impl Permission for MyPermission {
|
||||
fn key(&self) -> CowStr {
|
||||
match self {
|
||||
Self::Config => "myapp.config".into(),
|
||||
Self::Config => "myapp:config".into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue