Skip to content

Commit

Permalink
- CollaborateAction: do not allow items in Shares Jail to be reshared
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schwarz committed May 24, 2024
1 parent c0acb89 commit 76f2402
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class CollaborateAction: Action {
// MARK: - Extension matching
override class func applicablePosition(forContext: ActionContext) -> ActionPosition {
if forContext.items.count == 1, let core = forContext.core, core.connectionStatus == .online, core.connection.capabilities?.sharingAPIEnabled == 1, let item = forContext.items.first, item.isShareable {
if let driveID = item.driveID, driveID == OCDriveIDSharesJail {
// Disable re-sharing by not allowing to share items located in the Shares Jail (https://github.com/owncloud/ios-app/issues/1353)
return .none
}
return .first
}

Expand Down

0 comments on commit 76f2402

Please sign in to comment.