mirror of
				https://github.com/dani-garcia/vaultwarden.git
				synced 2025-10-28 00:40:01 +02:00 
			
		
		
		
	Remove debug impl from database structs
This is only implemented for the database specific structs, which is not what we want
This commit is contained in:
		| @@ -4,7 +4,7 @@ use super::Cipher; | |||||||
| use crate::CONFIG; | use crate::CONFIG; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] | ||||||
|     #[table_name = "attachments"] |     #[table_name = "attachments"] | ||||||
|     #[changeset_options(treat_none_as_null="true")] |     #[changeset_options(treat_none_as_null="true")] | ||||||
|     #[belongs_to(super::Cipher, foreign_key = "cipher_uuid")] |     #[belongs_to(super::Cipher, foreign_key = "cipher_uuid")] | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ use super::{ | |||||||
| }; | }; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] | ||||||
|     #[table_name = "ciphers"] |     #[table_name = "ciphers"] | ||||||
|     #[changeset_options(treat_none_as_null="true")] |     #[changeset_options(treat_none_as_null="true")] | ||||||
|     #[belongs_to(User, foreign_key = "user_uuid")] |     #[belongs_to(User, foreign_key = "user_uuid")] | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ use serde_json::Value; | |||||||
| use super::{Organization, UserOrgStatus, UserOrgType, UserOrganization, User, Cipher}; | use super::{Organization, UserOrgStatus, UserOrgType, UserOrganization, User, Cipher}; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] | ||||||
|     #[table_name = "collections"] |     #[table_name = "collections"] | ||||||
|     #[belongs_to(Organization, foreign_key = "org_uuid")] |     #[belongs_to(Organization, foreign_key = "org_uuid")] | ||||||
|     #[primary_key(uuid)] |     #[primary_key(uuid)] | ||||||
| @@ -13,7 +13,7 @@ db_object! { | |||||||
|         pub name: String, |         pub name: String, | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] |     #[derive(Identifiable, Queryable, Insertable, Associations)] | ||||||
|     #[table_name = "users_collections"] |     #[table_name = "users_collections"] | ||||||
|     #[belongs_to(User, foreign_key = "user_uuid")] |     #[belongs_to(User, foreign_key = "user_uuid")] | ||||||
|     #[belongs_to(Collection, foreign_key = "collection_uuid")] |     #[belongs_to(Collection, foreign_key = "collection_uuid")] | ||||||
| @@ -25,7 +25,7 @@ db_object! { | |||||||
|         pub hide_passwords: bool, |         pub hide_passwords: bool, | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] |     #[derive(Identifiable, Queryable, Insertable, Associations)] | ||||||
|     #[table_name = "ciphers_collections"] |     #[table_name = "ciphers_collections"] | ||||||
|     #[belongs_to(Cipher, foreign_key = "cipher_uuid")] |     #[belongs_to(Cipher, foreign_key = "cipher_uuid")] | ||||||
|     #[belongs_to(Collection, foreign_key = "collection_uuid")] |     #[belongs_to(Collection, foreign_key = "collection_uuid")] | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ use super::User; | |||||||
| use crate::CONFIG; | use crate::CONFIG; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] | ||||||
|     #[table_name = "devices"] |     #[table_name = "devices"] | ||||||
|     #[changeset_options(treat_none_as_null="true")] |     #[changeset_options(treat_none_as_null="true")] | ||||||
|     #[belongs_to(User, foreign_key = "user_uuid")] |     #[belongs_to(User, foreign_key = "user_uuid")] | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| use super::{Cipher, User}; | use super::{Cipher, User}; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] |     #[derive(Identifiable, Queryable, Insertable, Associations)] | ||||||
|     #[table_name = "favorites"] |     #[table_name = "favorites"] | ||||||
|     #[belongs_to(User, foreign_key = "user_uuid")] |     #[belongs_to(User, foreign_key = "user_uuid")] | ||||||
|     #[belongs_to(Cipher, foreign_key = "cipher_uuid")] |     #[belongs_to(Cipher, foreign_key = "cipher_uuid")] | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ use serde_json::Value; | |||||||
| use super::{Cipher, User}; | use super::{Cipher, User}; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] | ||||||
|     #[table_name = "folders"] |     #[table_name = "folders"] | ||||||
|     #[belongs_to(User, foreign_key = "user_uuid")] |     #[belongs_to(User, foreign_key = "user_uuid")] | ||||||
|     #[primary_key(uuid)] |     #[primary_key(uuid)] | ||||||
| @@ -16,7 +16,7 @@ db_object! { | |||||||
|         pub name: String, |         pub name: String, | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] |     #[derive(Identifiable, Queryable, Insertable, Associations)] | ||||||
|     #[table_name = "folders_ciphers"] |     #[table_name = "folders_ciphers"] | ||||||
|     #[belongs_to(Cipher, foreign_key = "cipher_uuid")] |     #[belongs_to(Cipher, foreign_key = "cipher_uuid")] | ||||||
|     #[belongs_to(Folder, foreign_key = "folder_uuid")] |     #[belongs_to(Folder, foreign_key = "folder_uuid")] | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ use crate::error::MapResult; | |||||||
| use super::{Organization, UserOrgStatus}; | use super::{Organization, UserOrgStatus}; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] | ||||||
|     #[table_name = "org_policies"] |     #[table_name = "org_policies"] | ||||||
|     #[belongs_to(Organization, foreign_key = "org_uuid")] |     #[belongs_to(Organization, foreign_key = "org_uuid")] | ||||||
|     #[primary_key(uuid)] |     #[primary_key(uuid)] | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ use num_traits::FromPrimitive; | |||||||
| use super::{CollectionUser, User, OrgPolicy}; | use super::{CollectionUser, User, OrgPolicy}; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, AsChangeset)] | ||||||
|     #[table_name = "organizations"] |     #[table_name = "organizations"] | ||||||
|     #[primary_key(uuid)] |     #[primary_key(uuid)] | ||||||
|     pub struct Organization { |     pub struct Organization { | ||||||
| @@ -14,7 +14,7 @@ db_object! { | |||||||
|         pub billing_email: String, |         pub billing_email: String, | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, AsChangeset)] | ||||||
|     #[table_name = "users_organizations"] |     #[table_name = "users_organizations"] | ||||||
|     #[primary_key(uuid)] |     #[primary_key(uuid)] | ||||||
|     pub struct UserOrganization { |     pub struct UserOrganization { | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ use crate::error::MapResult; | |||||||
| use super::User; | use super::User; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, Associations, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, Associations, AsChangeset)] | ||||||
|     #[table_name = "twofactor"] |     #[table_name = "twofactor"] | ||||||
|     #[belongs_to(User, foreign_key = "user_uuid")] |     #[belongs_to(User, foreign_key = "user_uuid")] | ||||||
|     #[primary_key(uuid)] |     #[primary_key(uuid)] | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ use crate::crypto; | |||||||
| use crate::CONFIG; | use crate::CONFIG; | ||||||
|  |  | ||||||
| db_object! { | db_object! { | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable, AsChangeset)] |     #[derive(Identifiable, Queryable, Insertable, AsChangeset)] | ||||||
|     #[table_name = "users"] |     #[table_name = "users"] | ||||||
|     #[changeset_options(treat_none_as_null="true")] |     #[changeset_options(treat_none_as_null="true")] | ||||||
|     #[primary_key(uuid)] |     #[primary_key(uuid)] | ||||||
| @@ -47,7 +47,7 @@ db_object! { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|     #[derive(Debug, Identifiable, Queryable, Insertable)] |     #[derive(Identifiable, Queryable, Insertable)] | ||||||
|     #[table_name = "invitations"] |     #[table_name = "invitations"] | ||||||
|     #[primary_key(email)] |     #[primary_key(email)] | ||||||
|     pub struct Invitation { |     pub struct Invitation { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user