Skip to content

Commit

Permalink
Use RepoPermissionChecker facet in Mononoke Git Server
Browse files Browse the repository at this point in the history
Summary: We will start enforcing ACL based checking in Mononoke Git Server, and the first step for that is to include the RepoPermissionChecker facet as part of the Repo facet container. This will be used in a diff later in the stack.

Reviewed By: mitrandir77

Differential Revision: D55796149

fbshipit-source-id: 3903f1114a3c2bf2a7e50f0891076b6195e8476e
  • Loading branch information
RajivTS authored and facebook-github-bot committed Apr 6, 2024
1 parent 0be4243 commit 107fae5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions eden/mononoke/git_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ protocol = { version = "0.1.0", path = "../git/protocol" }
repo_blobstore = { version = "0.1.0", path = "../blobrepo/repo_blobstore" }
repo_derived_data = { version = "0.1.0", path = "../repo_attributes/repo_derived_data" }
repo_identity = { version = "0.1.0", path = "../repo_attributes/repo_identity" }
repo_permission_checker = { version = "0.1.0", path = "../repo_attributes/repo_permission_checker" }
secure_utils = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
serde = { version = "1.0.185", features = ["derive", "rc"] }
sharding_ext = { version = "0.1.0", path = "../cmdlib/sharding_ext" }
Expand Down
1 change: 1 addition & 0 deletions eden/mononoke/git_server/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ rust_binary(
"//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
"//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
"//eden/mononoke/repo_attributes/repo_identity:repo_identity",
"//eden/mononoke/repo_attributes/repo_permission_checker:repo_permission_checker",
"//eden/mononoke/server/context:context",
"//eden/scm/lib/clientinfo:clientinfo",
],
Expand Down
4 changes: 4 additions & 0 deletions eden/mononoke/git_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ use mononoke_app::MononokeReposManager;
use repo_blobstore::RepoBlobstore;
use repo_derived_data::RepoDerivedData;
use repo_identity::RepoIdentity;
use repo_permission_checker::RepoPermissionChecker;
use slog::info;
use tokio::net::TcpListener;

Expand Down Expand Up @@ -118,6 +119,9 @@ pub struct Repo {

#[facet]
commit_graph: CommitGraph,

#[facet]
repo_permission_checker: dyn RepoPermissionChecker,
}

/// Mononoke Git Server
Expand Down

0 comments on commit 107fae5

Please sign in to comment.