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 27, 2024
1 parent d24517e commit 532b6ca
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 532b6ca

Please sign in to comment.