Skip to content
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

Archiver and app provider capabilities #2529

Merged
merged 5 commits into from
Sep 23, 2021

Conversation

wkloucek
Copy link
Contributor

@wkloucek wkloucek commented Sep 22, 2021

Description

Adds the archiver and app provider to the ocs capabilities.
Removes unused structs, which already live in REVA

Related Issue

Motivation and Context

How Has This Been Tested?

  • locally:
curl --insecure 'https://localhost:9200/ocs/v1.php/cloud/capabilities?format=json' -u einstein:relativity | jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1715  100  1715    0     0   2436      0 --:--:-- --:--:-- --:--:--  2436
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 100,
      "message": "OK"
    },
    "data": {
      "capabilities": {
        "core": {
          "pollinterval": 60,
          "webdav-root": "remote.php/webdav",
          "status": {
            "installed": true,
            "maintenance": false,
            "needsDbUpgrade": false,
            "version": "10.0.11.5",
            "versionstring": "10.0.11",
            "edition": "community",
            "productname": "reva"
          },
          "support-url-signing": true
        },
        "checksums": {
          "supportedTypes": [
            "sha1",
            "md5",
            "adler32"
          ],
          "preferredUploadType": "SHA1"
        },
        "files": {
          "privateLinks": false,
          "bigfilechunking": false,
          "undelete": true,
          "versioning": true,
          "favorites": false,
          "blacklisted_files": [],
          "tus_support": {
            "version": "1.0.0",
            "resumable": "1.0.0",
            "extension": "creation,creation-with-upload",
            "max_chunk_size": 0,
            "http_method_override": ""
          },
          "archivers": [
            {
              "enabled": true,
              "version": "2.0",
              "formats": [
                "tar",
                "zip"
              ],
              "archiver_url": "/archiver"
            }
          ],
          "app_providers": [
            {
              "enabled": true,
              "version": "1.0",
              "apps_url": "/app/list",
              "open_url": "/app/open"
            }
          ]
        },
        "dav": {
          "chunking": "",
          "trashbin": "1.0",
          "reports": [
            "search-files"
          ],
          "chunkingParallelUploadDisabled": false
        },
        "files_sharing": {
          "api_enabled": true,
          "resharing": true,
          "group_sharing": true,
          "auto_accept_share": true,
          "share_with_group_members_only": true,
          "share_with_membership_groups_only": true,
          "search_min_length": 3,
          "default_permissions": 22,
          "user_enumeration": {
            "enabled": true,
            "group_members_only": true
          },
          "federation": {
            "outgoing": true,
            "incoming": true
          },
          "public": {
            "enabled": true,
            "send_mail": true,
            "social_share": true,
            "upload": true,
            "multiple": true,
            "supports_upload_only": true,
            "password": {
              "enforced_for": {
                "read_only": true,
                "read_write": true,
                "upload_only": true
              },
              "enforced": true
            },
            "expire_date": {
              "enabled": false
            }
          },
          "user": {
            "send_mail": true,
            "profile_picture": false
          }
        }
      },
      "version": {
        "major": 10,
        "minor": 0,
        "micro": 11,
        "string": "10.0.11",
        "edition": "reva"
      }
    }
  }
}

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@wkloucek wkloucek marked this pull request as ready for review September 22, 2021 10:21
@wkloucek wkloucek marked this pull request as draft September 22, 2021 17:24
@jvillafanez
Copy link
Member

For the archiver, it has a maximum number of files and a maximum size that I think they should be in the capabilities. The client could prevent requests that we know that will fail.

@wkloucek wkloucek force-pushed the archiver_app_provider_capabilities branch 2 times, most recently from 62fa497 to 7f38afb Compare September 23, 2021 09:37
@wkloucek wkloucek marked this pull request as ready for review September 23, 2021 09:38
@wkloucek wkloucek changed the title Archiver app provider capabilities Archiver and app provider capabilities Sep 23, 2021
@wkloucek
Copy link
Contributor Author

For the archiver, it has a maximum number of files and a maximum size that I think they should be in the capabilities. The client could prevent requests that we know that will fail.

Good point 👍 Needs changes in REVA though...

@kulmann
Copy link
Member

kulmann commented Sep 23, 2021

For the archiver, it has a maximum number of files and a maximum size that I think they should be in the capabilities. The client could prevent requests that we know that will fail.

Good point 👍 Needs changes in REVA though...

Yes, good idea for improvement 👍 but please let's get this PR merged first, then improve it (IMO right away ;-) ).

Copy link
Member

@jvillafanez jvillafanez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the changes in the go.mod file, but the rest looks good to me.

@wkloucek wkloucek force-pushed the archiver_app_provider_capabilities branch from 7f38afb to 2eee954 Compare September 23, 2021 14:21
Co-authored-by: Pascal Wengerter <pwengerter@owncloud.com>
@wkloucek wkloucek force-pushed the archiver_app_provider_capabilities branch from 2eee954 to 8bc8f46 Compare September 23, 2021 14:23
storage/pkg/flagset/frontend.go Outdated Show resolved Hide resolved
storage/pkg/flagset/frontend.go Outdated Show resolved Hide resolved
Co-authored-by: Benedikt Kulmann <benedikt@kulmann.biz>
@sonarcloud
Copy link

sonarcloud bot commented Sep 23, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@wkloucek wkloucek merged commit b98b39f into master Sep 23, 2021
@delete-merged-branch delete-merged-branch bot deleted the archiver_app_provider_capabilities branch September 23, 2021 15:41
ownclouders pushed a commit that referenced this pull request Sep 23, 2021
Merge: 00f41cb 1a7c829
Author: Willy Kloucek <34452982+wkloucek@users.noreply.github.com>
Date:   Thu Sep 23 17:40:57 2021 +0200

    Merge pull request #2529 from owncloud/archiver_app_provider_capabilities

    Archiver  and app provider capabilities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Question] Add capability for app provider?
4 participants