From 76921e88542edd04f4e7cf1b75b25e3e715eaee0 Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 11 Sep 2020 15:15:03 +0200 Subject: [PATCH] Change field permission on CreateRole to permissions Signed-off-by: trivernis --- src/server/messages.rs | 2 +- src/server/user_rpc.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/messages.rs b/src/server/messages.rs index 94d67be..3854c4d 100644 --- a/src/server/messages.rs +++ b/src/server/messages.rs @@ -67,7 +67,7 @@ pub struct GetPermissionsRequest { pub struct CreateRoleRequest { pub name: String, pub description: Option, - pub permission: Vec, + pub permissions: Vec, } #[derive(Deserialize)] diff --git a/src/server/user_rpc.rs b/src/server/user_rpc.rs index 2965836..922fe67 100644 --- a/src/server/user_rpc.rs +++ b/src/server/user_rpc.rs @@ -152,7 +152,7 @@ impl UserRpcServer { let role = self.database.roles.create_role( message.name, message.description, - message.permission, + message.permissions, )?; Ok(Message::new_with_serialize(CREATE_ROLE, role))