-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database transactions similar api addPolicies
, removePolicies
#55
Comments
see #59 More unit tests need to be added around this, I'll add them when I got time. There are also many work regarding It must be able to do transaction. |
Hey there! I'm interested in this issue and wanted to know if I can help out with the unit tests. |
@drholmie Hello, thanks for being interested in this. Could you help testing the following methods? async fn add_policies(&mut self, paramss: Vec<Vec<&str>>) -> Result<bool>;
async fn remove_policies(&mut self, paramss: Vec<Vec<&str>>) -> Result<bool>;
async fn add_named_policies(&mut self, ptype: &str, paramss: Vec<Vec<&str>>) -> Result<bool>;
async fn remove_named_policies(&mut self, ptype: &str, paramss: Vec<Vec<&str>>)
-> Result<bool>;
async fn add_grouping_policies(&mut self, paramss: Vec<Vec<&str>>) -> Result<bool>;
async fn remove_grouping_policies(&mut self, paramss: Vec<Vec<&str>>) -> Result<bool>;
async fn add_named_grouping_policies(
&mut self,
ptype: &str,
paramss: Vec<Vec<&str>>,
) -> Result<bool>;
async fn remove_named_grouping_policies(
&mut self,
ptype: &str,
paramss: Vec<Vec<&str>>,
) -> Result<bool>;
async fn add_permissions_for_user(
&mut self,
user: &str,
permissions: Vec<Vec<&str>>,
) -> Result<bool>;
async fn add_roles_for_user(
&mut self,
user: &str,
roles: Vec<&str>,
domain: Option<&str>,
) -> Result<bool>; Currently we haven't make diesel-adapter supports this, ideally we should have |
Awesome! will start with the tests first then. Thank you for clarifying :) |
diesel-adapter now has also: async fn add_policies(
&mut self,
_sec: &str,
ptype: &str,
rules: Vec<Vec<&str>>,
) -> Result<bool>;
async fn remove_policies(
&mut self,
_sec: &str,
pt: &str,
rules: Vec<Vec<&str>>,
) -> Result<bool>; |
Closed as resolved. |
Hey there @GopherJ wanted to clarify a few things. Firstly, should I open a new issue to better track the completion of tests? Secondly, should I also follow the double insert and remove checks as mentioned in the
for |
Hello @drholmie , yes u can open a new issue to better track the completion of tests. Yes u can do that. |
Thanks for the go ahead @GopherJ ! |
See casbin/node-casbin#105
The text was updated successfully, but these errors were encountered: