Skip to content

Share restriction#2033

Closed
Kjehad94 wants to merge 4 commits into
owncloud:masterfrom
Kjehad94:share_restriction
Closed

Share restriction#2033
Kjehad94 wants to merge 4 commits into
owncloud:masterfrom
Kjehad94:share_restriction

Conversation

@Kjehad94

@Kjehad94 Kjehad94 commented Sep 12, 2017

Copy link
Copy Markdown

I am requesting this pull request to add a new feature for OwnCloud which enables the users to restrict individual files to be shared among users and groups if it is specified in the JSON file and server side.

because it is in a different repo there is a missing class here which I modified which is GetRemoteCapabilityOperations.Java which have the changes here:

`

// JSON Node names
private static final String PROPERTY_RESTRICT_INDIVIDUAL_FILE_SHARING= "restrict_individual_file_sharing";
               // Capabilities Object

                    // Add files_sharing: public, user, resharing
                    if (respCapabilities.has(NODE_FILES_SHARING)) {
                        JSONObject respFilesSharing = respCapabilities.getJSONObject(NODE_FILES_SHARING);
                        if (respFilesSharing.has(PROPERTY_API_ENABLED)) {
                            capability.setFilesSharingApiEnabled(CapabilityBooleanType.fromBooleanValue(
                                    respFilesSharing.getBoolean(PROPERTY_API_ENABLED)));
                        }

                        capability.setmIndividualFileSharingRestriction(CapabilityBooleanType.fromBooleanValue(respFilesSharing.getBoolean(PROPERTY_RESTRICT_INDIVIDUAL_FILE_SHARING)));
                        Log_OC.d(TAG, "*** individual restriction " + capability.getmIndividualFileSharingRestriction());

`

Please ignore the modification of Phonebook feature as long as it is only specified for CERNBox users.

Thanks in advance

…the individual files if it is added by the JSON file. The remained class is withen own_cloud_library which is GetRemoteCapabilitiesOperation
@CLAassistant

CLAassistant commented Sep 12, 2017

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jesmrec

jesmrec commented Sep 12, 2017

Copy link
Copy Markdown
Member

which server capability does this one correspond?

@Kjehad94

Kjehad94 commented Sep 14, 2017 via email

Copy link
Copy Markdown
Author

@jesmrec

jesmrec commented Sep 14, 2017

Copy link
Copy Markdown
Member

i know, but the JSON from the server should include that capability, so the server side should be adapted to this change as well, as i understand.

@Kjehad94

Kjehad94 commented Sep 15, 2017 via email

Copy link
Copy Markdown
Author

@PVince81

Copy link
Copy Markdown

there's a PR for more capabilities in server here: owncloud/core#28977

@davigonz

Copy link
Copy Markdown
Contributor

Hi @Kjehad94 , some tests have failed because of:

/home/travis/build/owncloud/android/src/com/owncloud/android/datamodel/FileDataStorageManager.java:1890: error: cannot find symbol cv.put(ProviderTableMeta.CAPABILITIES_SHARING_INDIVIDUAL_RESTRICTION, capability.getmIndividualFileSharingRestriction().getValue());

Could you have a look at it? For more info, just click on Show all checks and Details button below this comment

@jesmrec

jesmrec commented May 14, 2019

Copy link
Copy Markdown
Member

any new here? capabilities have been increased and evoluted a lot since this PR was created. @Kjehad94 are you still interested in the current feature?

@jesmrec jesmrec closed this Jun 18, 2019
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.

5 participants