-
Notifications
You must be signed in to change notification settings - Fork 136
[feature/kiteworks-build] Kiteworks Integration #1479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
….skip-www-authenticate-checks` option
…d client_secret in case token endpoint does not support passing them via Basic Auth (RFC 6749, section 2.3.1), new parameter `authentication-oauth2.post-client-id-and-secret`
…led due to incorrect Xcode project settings
- Fastlane: Copy Branding.plist file into the correct folder.
…kiteworks-build # Conflicts: # ios-sdk # ownCloud Action Extension/InfoPlist.xcstrings # ownCloud Share Extension/InfoPlist.xcstrings # ownCloud.xcodeproj/project.pbxproj # ownCloud/Resources/InfoPlist.xcstrings
…uthentication steps. Reusing a single connection for all steps ensures that the Kiteworks product name can be retrieved from status.php in OCConnection+Tools, allowing the 'kwdav' prefix to be added to server URL paths.
- merge with master v12.5.0 - hide collection size for Kiteworks server (always 0 bytes)
|
- reset entitlements and Info.plist files to vanilla values - deleted branding assets
let connection = OCConnection(bookmark: bmark) | ||
self.connection = connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new OCConnection
is instantiated on purpose for each step calling this method, to always start at from a fresh slate. What problem does instantiating only one OCConnection
and keeping it around solve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I do not have this change I lose the server status in the setup process and I cannot access later the Kiteworks
product.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I see that in the SDK, you implement OCConnection.isKiteworksServer
as
- (BOOL)isKiteworksServer
{
return (([((NSDictionary *)self.bookmark.userInfo[@"statusInfo"])[@"product"] isEqual:@"kiteworks"] || [self.product isEqualToString:@"kiteworks"]));
}
which depends on the statusInfo
(OCBookmarkUserInfoKeyStatusInfo
) stored in the bookmark in -[OCConnection connectWithCompletionHandler:]
, which will only be called at the point where authentication is already set up. That info should also not get lost when not re-using the OCConnection, as it that info is stored in the OCBookmark
that's being operated on during setup.
[Addition lateron: I only just saw that you're also using a new OCConnection.product
property here, whose value will indeed vanish with the instance. However, instead of storing that value in the OCConnection.product
(where it'll go away), only to then check it later, please consider checking it right for equality with kiteworks
right away - and if it is equal, store it as kiteworks
capability as suggested below.]
A more stable and easier way to store that info would be using -[OCBookmark addCapability:]
and -[OCBookmark hasCapability:]
, which is already used to mark a bookmark as supporting drives (spaces) and favorites. Here's how that looks for drive support:
- (BOOL)useDriveAPI
{
return (self.capabilities.spacesEnabled.boolValue || [self.bookmark hasCapability:OCBookmarkCapabilityDrives]);
}
A benefit is that you can use that OCConnection.isKiteworksServer
, but also directly with OCBookmark
anywhere via f.ex.[bookmark hasCapability:OCBookmarkCapabilityKiteworks]
.
At any rate, persisting and re-using the OCConnection
instance should not be needed as
- the info should be stored in the
OCBookmark
- from where a newOCConnection
instance can also fetch it - this is not how
OCConnection
was used until now, so using it like this is uncharted territory and might have unwanted side-effects
ownCloud/Resources/Theming/com.owncloud.ios-app.kiteworks/Branding.plist
Outdated
Show resolved
Hide resolved
ownCloud/Resources/Theming/com.owncloud.ios-app.kiteworks/Branding.plist
Outdated
Show resolved
Hide resolved
ownCloud/Resources/Theming/com.owncloud.ios-app.kiteworks/Branding.plist
Outdated
Show resolved
Hide resolved
let connection = OCConnection(bookmark: bmark) | ||
self.connection = connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I see that in the SDK, you implement OCConnection.isKiteworksServer
as
- (BOOL)isKiteworksServer
{
return (([((NSDictionary *)self.bookmark.userInfo[@"statusInfo"])[@"product"] isEqual:@"kiteworks"] || [self.product isEqualToString:@"kiteworks"]));
}
which depends on the statusInfo
(OCBookmarkUserInfoKeyStatusInfo
) stored in the bookmark in -[OCConnection connectWithCompletionHandler:]
, which will only be called at the point where authentication is already set up. That info should also not get lost when not re-using the OCConnection, as it that info is stored in the OCBookmark
that's being operated on during setup.
[Addition lateron: I only just saw that you're also using a new OCConnection.product
property here, whose value will indeed vanish with the instance. However, instead of storing that value in the OCConnection.product
(where it'll go away), only to then check it later, please consider checking it right for equality with kiteworks
right away - and if it is equal, store it as kiteworks
capability as suggested below.]
A more stable and easier way to store that info would be using -[OCBookmark addCapability:]
and -[OCBookmark hasCapability:]
, which is already used to mark a bookmark as supporting drives (spaces) and favorites. Here's how that looks for drive support:
- (BOOL)useDriveAPI
{
return (self.capabilities.spacesEnabled.boolValue || [self.bookmark hasCapability:OCBookmarkCapabilityDrives]);
}
A benefit is that you can use that OCConnection.isKiteworksServer
, but also directly with OCBookmark
anywhere via f.ex.[bookmark hasCapability:OCBookmarkCapabilityKiteworks]
.
At any rate, persisting and re-using the OCConnection
instance should not be needed as
- the info should be stored in the
OCBookmark
- from where a newOCConnection
instance can also fetch it - this is not how
OCConnection
was used until now, so using it like this is uncharted territory and might have unwanted side-effects
Description
This PR adds Kiteworks integration to the iOS ownCloud app.
The SDK was adopted to detect a Kiteworks server and proceed with the needed logic.
The iOS app got some adoption regarding sidebar items and not to show folder sizes (as it is not available on Kiteworks server).
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: