csv: Fix unused_variables warning
This commit is contained in:
parent
30525d4408
commit
de257231a7
1 changed files with 7 additions and 1 deletions
|
@ -3,17 +3,21 @@ use labadoor_acl::{ACLEntry, AuthMethod, ResourceShortcuts, ACL};
|
||||||
|
|
||||||
impl ACL for CSV {
|
impl ACL for CSV {
|
||||||
/// ACLEntry
|
/// ACLEntry
|
||||||
|
#[allow(unused_variables)]
|
||||||
fn allow_access(&self, user: String, resource: String) {
|
fn allow_access(&self, user: String, resource: String) {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
#[allow(unused_variables)]
|
||||||
fn deny_access(&self, user: Option<String>, resource: Option<String>) {
|
fn deny_access(&self, user: Option<String>, resource: Option<String>) {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// AuthMethod
|
/// AuthMethod
|
||||||
|
#[allow(unused_variables)]
|
||||||
fn add_auth_method(&self, user: String, method: String, identifier: String) {
|
fn add_auth_method(&self, user: String, method: String, identifier: String) {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
#[allow(unused_variables)]
|
||||||
fn del_auth_method(
|
fn del_auth_method(
|
||||||
&self,
|
&self,
|
||||||
user: Option<String>,
|
user: Option<String>,
|
||||||
|
@ -24,9 +28,11 @@ impl ACL for CSV {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ResourceShortcuts
|
/// ResourceShortcuts
|
||||||
|
#[allow(unused_variables)]
|
||||||
fn add_shortcut(&self, user: String, resource: String, shortcut: i8) {
|
fn add_shortcut(&self, user: String, resource: String, shortcut: i8) {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
#[allow(unused_variables)]
|
||||||
fn del_shortcut(&self, user: Option<String>, resource: Option<String>, shortcut: Option<i8>) {
|
fn del_shortcut(&self, user: Option<String>, resource: Option<String>, shortcut: Option<i8>) {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
@ -61,6 +67,6 @@ impl ACL for CSV {
|
||||||
fn is_allowed(&self, username: String, resource: String) -> Option<()> {
|
fn is_allowed(&self, username: String, resource: String) -> Option<()> {
|
||||||
let needle = ACLEntry { username, resource };
|
let needle = ACLEntry { username, resource };
|
||||||
let res = self.find::<ACLEntry>(needle, "acl_entries.csv");
|
let res = self.find::<ACLEntry>(needle, "acl_entries.csv");
|
||||||
return if let Some(r) = res { Some(()) } else { None };
|
return if let Some(_) = res { Some(()) } else { None };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue