pub struct CheckFieldAccessRights {
pub database: String,
pub uid: OdooId,
pub password: String,
pub model: String,
pub operation: AccessOperation,
pub fields: Vec<String>,
}
Expand description
Check the user access rights on the given fields
Note: Like the Exists
method, this method accepts a list of fields,
then returns the subset of those fields that can be accessed via operation
.
Note2: This method doesn’t check if the passed fields actually exist.
§Example
use odoo_api::service::orm::AccessOperation;
client.check_field_access_rights(
"res.partner",
AccessOperation::Unlink,
svec!["parent_id", "email", "id"]
).send()?;
See: odoo/models.py
Fields§
§database: String
The database name (auto-filled by OdooClient
)
uid: OdooId
The user id (auto-filled by OdooClient
)
password: String
The user password (auto-filled by OdooClient
)
model: String
The Odoo model
operation: AccessOperation
The CRUD operation to check
fields: Vec<String>
A list of fields to check
Trait Implementations§
Source§impl Debug for CheckFieldAccessRights
impl Debug for CheckFieldAccessRights
Source§impl JsonRpcParams for CheckFieldAccessRights
impl JsonRpcParams for CheckFieldAccessRights
type Container<T> = OdooOrmContainer<CheckFieldAccessRights>
type Response = CheckFieldAccessRightsResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooOrmMethod for CheckFieldAccessRights
impl OdooOrmMethod for CheckFieldAccessRights
Source§fn endpoint(&self) -> &'static str
fn endpoint(&self) -> &'static str
Describe the “ORM” method endpoint (e.g., “/web/session/authenticate”)
Source§fn method(&self) -> &'static str
fn method(&self) -> &'static str
Return the model method name (e.g., “read_group” or “create”)
Source§fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Build
self
into a full JsonRpcRequest
Auto Trait Implementations§
impl Freeze for CheckFieldAccessRights
impl RefUnwindSafe for CheckFieldAccessRights
impl Send for CheckFieldAccessRights
impl Sync for CheckFieldAccessRights
impl Unpin for CheckFieldAccessRights
impl UnwindSafe for CheckFieldAccessRights
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more