Don't validate prefixes and postfixes for db item ownership

This commit is contained in:
2024-08-17 22:30:30 +02:00
parent 54a38255e6
commit f957bbd9da
3 changed files with 11 additions and 38 deletions

View File

@@ -160,7 +160,9 @@ pub fn generate_editor_content_from_privilege_data(
database_name: Option<&str>,
) -> String {
let example_user = format!("{}_user", unix_user);
let example_db = database_name.unwrap_or(&format!("{}_db", unix_user)).to_string();
let example_db = database_name
.unwrap_or(&format!("{}_db", unix_user))
.to_string();
// NOTE: `.max()`` fails when the iterator is empty.
// In this case, we know that the only fields in the