add: developer pass
This commit is contained in:
parent
636ecce9f4
commit
02f3d08926
14 changed files with 355 additions and 101 deletions
|
@ -15,7 +15,7 @@ use tetratto_core::{
|
|||
config::Config,
|
||||
model::{
|
||||
auth::{DefaultTimelineChoice, User},
|
||||
permissions::FinePermission,
|
||||
permissions::{FinePermission, SecondaryPermission},
|
||||
},
|
||||
};
|
||||
use tetratto_l10n::LangFile;
|
||||
|
@ -516,6 +516,11 @@ pub(crate) async fn initial_context(
|
|||
"is_supporter",
|
||||
&ua.permissions.check(FinePermission::SUPPORTER),
|
||||
);
|
||||
ctx.insert(
|
||||
"has_developer_pass",
|
||||
&ua.secondary_permissions
|
||||
.check(SecondaryPermission::DEVELOPER_PASS),
|
||||
);
|
||||
ctx.insert("home", &ua.settings.default_timeline.relative_url());
|
||||
} else {
|
||||
ctx.insert("is_helper", &false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue