JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Implement `FromOperationState` for `AuthenticatedUser` and `AuthenticatedInstance`

Use `AuthenticatedUser` on repository requests so we can filter by privacy. Woohoo! Attempt to filter `UserRepositoriesRequest` responses by visibility to the requester.

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨75dcac3

⁨giterated-models/src/repository/settings.rs⁩ - ⁨452⁩ bytes
Raw
1 use serde::{Deserialize, Serialize};
2
3 use crate::{settings::Setting, user::User};
4
5 use super::DefaultBranch;
6
7 impl Setting for DefaultBranch {
8 fn name() -> &'static str {
9 "default_branch"
10 }
11 }
12
13 #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)]
14 #[repr(transparent)]
15 #[serde(transparent)]
16 pub struct AccessList(pub Vec<User>);
17
18 impl Setting for AccessList {
19 fn name() -> &'static str {
20 "access_list"
21 }
22 }
23