-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Disable lock support using property in connection profile. #15860
Conversation
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.
To avoid multiple profiles I would rather vote for adding support to query the Capabilities API if locking is supported and return the correct feature based on the configuration. A sample response with locking enabled looks as follows.
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
<totalitems/>
<itemsperpage/>
</meta>
<data>
<version>
<major>25</major>
<minor>0</minor>
<micro>13</micro>
<string>25.0.13</string>
<edition/>
<extendedSupport/>
</version>
<capabilities>
<core>
<pollinterval>60</pollinterval>
<webdav-root>remote.php/webdav</webdav-root>
<reference-api>1</reference-api>
<reference-regex>(\s|\n|^)(https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|$)</reference-regex>
</core>
<bruteforce>
<delay>0</delay>
</bruteforce>
<metadataAvailable>
<size>
<element>/image\/.*/</element>
</size>
<gps>
<element>/image\/.*/</element>
</gps>
</metadataAvailable>
<files>
<bigfilechunking>1</bigfilechunking>
<blacklisted_files>
<element>.htaccess</element>
</blacklisted_files>
<directEditing>
<url>https://cloud.my.cloud/ocs/v2.php/apps/files/api/v1/directEditing</url>
<etag>c748e8fc588b54fc5af38c4481a19d20</etag>
</directEditing>
<comments>1</comments>
<locking>1.0</locking>
<api-feature-lock-type>1</api-feature-lock-type>
<undelete>1</undelete>
<versioning>1</versioning>
</files>
<activity>
<apiv2>
<element>filters</element>
<element>filters-api</element>
<element>previews</element>
<element>rich-strings</element>
</apiv2>
</activity>
<circles>
<version>25.0.0</version>
<status>
<globalScale/>
</status>
<settings>
<frontendEnabled>1</frontendEnabled>
<allowedCircles>262143</allowedCircles>
<allowedUserTypes>31</allowedUserTypes>
<membersLimit>-1</membersLimit>
</settings>
<circle>
<constants>
<flags>
<element>Single</element>
<element>Personal</element>
<element>System</element>
<element>Visible</element>
<element>Open</element>
<element>Invite</element>
<element>Join Request</element>
<element>Friends</element>
<element>Password Protected</element>
<element>No Owner</element>
<element>Hidden</element>
<element>Backend</element>
<element>Local</element>
<element>Root</element>
<element>Circle Invite</element>
<element>Federated</element>
<element>Mount point</element>
</flags>
<source>
<core>
<element>Nextcloud Account</element>
<element>Nextcloud Group</element>
<element>Email Address</element>
<element>Contact</element>
<element>Circle</element>
<element>Nextcloud App</element>
</core>
<extra>
<element>Circles App</element>
<element>Admin Command Line</element>
</extra>
</source>
</constants>
<config>
<coreFlags>
<element>1</element>
<element>2</element>
<element>4</element>
</coreFlags>
<systemFlags>
<element>512</element>
<element>1024</element>
<element>2048</element>
</systemFlags>
</config>
</circle>
<member>
<constants>
<level>
<element>Member</element>
<element>Moderator</element>
<element>Admin</element>
<element>Owner</element>
</level>
</constants>
<type>
<element>single</element>
<element>user</element>
<element>group</element>
<element>mail</element>
<element>contact</element>
<element>circle</element>
<element>app</element>
</type>
</member>
</circles>
<ocm>
<enabled>1</enabled>
<apiVersion>1.0-proposal1</apiVersion>
<endPoint>https://cloud.my.cloud/ocm</endPoint>
<resourceTypes>
<element>
<name>file</name>
<shareTypes>
<element>user</element>
<element>group</element>
</shareTypes>
<protocols>
<webdav>/public.php/webdav/</webdav>
</protocols>
</element>
</resourceTypes>
</ocm>
<dav>
<chunking>1.0</chunking>
<bulkupload>1.0</bulkupload>
</dav>
<files_sharing>
<api_enabled>1</api_enabled>
<public>
<enabled>1</enabled>
<password>
<enforced/>
<askForOptionalPassword/>
</password>
<expire_date>
<enabled/>
</expire_date>
<multiple_links>1</multiple_links>
<expire_date_internal>
<enabled/>
</expire_date_internal>
<expire_date_remote>
<enabled/>
</expire_date_remote>
<send_mail/>
<upload>1</upload>
<upload_files_drop>1</upload_files_drop>
</public>
<resharing>1</resharing>
<user>
<send_mail/>
<expire_date>
<enabled>1</enabled>
</expire_date>
</user>
<group_sharing>1</group_sharing>
<group>
<enabled>1</enabled>
<expire_date>
<enabled>1</enabled>
</expire_date>
</group>
<default_permissions>31</default_permissions>
<federation>
<outgoing>1</outgoing>
<incoming>1</incoming>
<expire_date>
<enabled>1</enabled>
</expire_date>
<expire_date_supported>
<enabled>1</enabled>
</expire_date_supported>
</federation>
<sharee>
<query_lookup_default/>
<always_show_unique>1</always_show_unique>
</sharee>
<sharebymail>
<enabled>1</enabled>
<send_password_by_mail>1</send_password_by_mail>
<upload_files_drop>
<enabled>1</enabled>
</upload_files_drop>
<password>
<enabled>1</enabled>
<enforced/>
</password>
<expire_date>
<enabled>1</enabled>
<enforced/>
</expire_date>
</sharebymail>
</files_sharing>
<notes>
<api_version>
<element>0.2</element>
<element>1.3</element>
</api_version>
<version>4.9.4</version>
</notes>
<notifications>
<ocs-endpoints>
<element>list</element>
<element>get</element>
<element>delete</element>
<element>delete-all</element>
<element>icons</element>
<element>rich-strings</element>
<element>action-web</element>
<element>user-status</element>
</ocs-endpoints>
<push>
<element>devices</element>
<element>object-data</element>
<element>delete</element>
</push>
<admin-notifications>
<element>ocs</element>
<element>cli</element>
</admin-notifications>
</notifications>
<password_policy>
<minLength>10</minLength>
<enforceNonCommonPassword>1</enforceNonCommonPassword>
<enforceNumericCharacters/>
<enforceSpecialCharacters/>
<enforceUpperLowerCase/>
<api>
<generate>https://cloud.my.cloud/ocs/v2.php/apps/password_policy/api/v1/generate</generate>
<validate>https://cloud.my.cloud/ocs/v2.php/apps/password_policy/api/v1/validate</validate>
</api>
</password_policy>
<provisioning_api>
<version>1.15.0</version>
<AccountPropertyScopesVersion>2</AccountPropertyScopesVersion>
<AccountPropertyScopesFederatedEnabled>1</AccountPropertyScopesFederatedEnabled>
<AccountPropertyScopesPublishedEnabled>1</AccountPropertyScopesPublishedEnabled>
</provisioning_api>
<theming>
<name/>
<url>https://my.cloud</url>
<slogan/>
<color>#BABABA</color>
<color-text>#000000</color-text>
<color-element>#BABABA</color-element>
<color-element-bright>#BABABA</color-element-bright>
<color-element-dark>#BABABA</color-element-dark>
<logo>https://cloud.my.cloud/apps/theming/image/logo?useSvg=1&v=10</logo>
<background>#BABABA</background>
<background-plain>1</background-plain>
<background-default>1</background-default>
<logoheader>https://cloud.my.cloud/apps/theming/image/logo?useSvg=1&v=10</logoheader>
<favicon>https://cloud.my.cloud/apps/theming/image/logo?useSvg=1&v=10</favicon>
</theming>
<user_status>
<enabled>1</enabled>
<supports_emoji/>
</user_status>
<weather_status>
<enabled>1</enabled>
</weather_status>
</capabilities>
</data>
</ocs>
Nevertheless my native DAV lock tests with the mentioned locking app have been successful. No additional headers are required. |
In #15874. |
Allow to enable lock support for users with Temporary files lock 1 installed in custom connection profile.
Footnotes
https://apps.nextcloud.com/apps/files_lock ↩