|
|
|
@ -9,6 +9,8 @@ use bitflags::bitflags;
|
|
|
|
|
id_type!(pub UserID: "A unique user ID");
|
|
|
|
|
id_type!(pub GroupID: "A user group ID");
|
|
|
|
|
|
|
|
|
|
//TODO: `User` and `Group` Builder types. Other ways of mutating them? idk yet
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
|
|
pub struct User
|
|
|
|
|
{
|
|
|
|
@ -29,6 +31,7 @@ pub struct User
|
|
|
|
|
groups: Vec<GroupID>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Iterator over all `Group`s a user is a part of (i.e. each group they're in's deduped & flattened inheritance graph)
|
|
|
|
|
|
|
|
|
|
/// A reference to a user in a userspace from their ID.
|
|
|
|
|