disallow opening private files (#7165)
- Disallow sharing gitignored files through collab - Show errors when failing to open files - Show a warning to followers when view is unshared /cc @mikaylamaki, let's update this to use your `private_files` config before merge. Release Notes: - Added the ability to prevent sharing private files over collab. --------- Co-authored-by: Piotr <piotr@zed.dev> Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
c983c9b6df
commit
dcca48482b
9 changed files with 101 additions and 19 deletions
|
@ -384,7 +384,7 @@ pub trait File: Send + Sync {
|
|||
/// Converts this file into a protobuf message.
|
||||
fn to_proto(&self) -> rpc::proto::File;
|
||||
|
||||
/// Return whether Zed considers this to be a dotenv file.
|
||||
/// Return whether Zed considers this to be a private file.
|
||||
fn is_private(&self) -> bool;
|
||||
}
|
||||
|
||||
|
@ -406,6 +406,11 @@ pub trait LocalFile: File {
|
|||
mtime: SystemTime,
|
||||
cx: &mut AppContext,
|
||||
);
|
||||
|
||||
/// Returns true if the file should not be shared with collaborators.
|
||||
fn is_private(&self, _: &AppContext) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
/// The auto-indent behavior associated with an editing operation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue