diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-31 14:57:29 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-31 14:57:29 -0800 |
commit | e16ba3d02564121ae5f27e0784be86137f3b9386 (patch) | |
tree | e1e19c2e1b678d041b64501c35a1ace6e8da900b /rust/src/api_server.rs | |
parent | 230032ec1a13dd3830bcffed6112c2fddabc4b6e (diff) | |
download | fatcat-e16ba3d02564121ae5f27e0784be86137f3b9386.tar.gz fatcat-e16ba3d02564121ae5f27e0784be86137f3b9386.zip |
rustfmt; implement role-based auth checks
Diffstat (limited to 'rust/src/api_server.rs')
-rw-r--r-- | rust/src/api_server.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs index cbf5be21..853f7bc2 100644 --- a/rust/src/api_server.rs +++ b/rust/src/api_server.rs @@ -20,11 +20,12 @@ macro_rules! entity_batch_handler { &self, entity_list: &[models::$model], autoaccept: bool, + editor_id: FatCatId, editgroup_id: Option<FatCatId>, conn: &DbConn, ) -> Result<Vec<EntityEdit>> { - let edit_context = make_edit_context(conn, editgroup_id, autoaccept)?; + let edit_context = make_edit_context(conn, editor_id, editgroup_id, autoaccept)?; edit_context.check(&conn)?; let model_list: Vec<&models::$model> = entity_list.iter().map(|e| e).collect(); let edits = $model::db_create_batch(conn, &edit_context, model_list.as_slice())?; |