Rewrite entire codebase to split into client and server

This commit was merged in pull request #55.
This commit is contained in:
2024-08-10 02:16:38 +02:00
parent 20e60ca5c7
commit af86893acf
32 changed files with 3708 additions and 1599 deletions
+11
View File
@@ -0,0 +1,11 @@
use crate::core::common::UnixUser;
/// This function creates a regex that matches items (users, databases)
/// that belong to the user or any of the user's groups.
pub fn create_user_group_matching_regex(user: &UnixUser) -> String {
if user.groups.is_empty() {
format!("{}(_.+)?", user.username)
} else {
format!("({}|{})(_.+)?", user.username, user.groups.join("|"))
}
}