Commit graph

296 commits

Author SHA1 Message Date
Christoph Wurst
e7f07ba02e
extract mail view for sending share invitations
fixes #22947
2016-04-19 11:37:23 +02:00
Thomas Müller
1773dcbef2 Merge pull request #23973 from owncloud/share_move_post_delete_from_group_hook
Move post_removeFromGroup to shareManager
2016-04-19 06:59:58 +02:00
Joas Schilling
79c17cdfa6
Fix Share::getUsersSharingFile() for mount points 2016-04-13 17:44:18 +02:00
Roeland Jago Douma
6144ced7a0
Move post_removeFromGroup to shareManager
The last sharing hook to be moved over.

* Added unit tests
* Removed old tests that relied on old behaviour
* Removed old hooks.php
2016-04-13 15:00:12 +02:00
Stefan Weil
ee5f5eebe5 misc: Fix some typos
Some of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-12 18:36:39 +02:00
Roeland Douma
495a964ca2 Migrate post_groupDelete hook to share manager (#23841)
The hook now calls the share manager that will call the responsible
shareProvider to do the proper cleanup.

* Unit tests added

Again nothing should change it is just to cleanup old code
2016-04-12 09:46:25 +02:00
Roeland Jago Douma
3fae4c82d2
Remove pre/post_addToGroup hooks for shares
There is no need to perform the checks for unique targets on add to
group as we have to do this all when mounting the shares anyway.
2016-04-08 11:56:38 +02:00
Roeland Jago Douma
e0cee43cf0 Migrate post_userDelete hook to share manager
This makes the post_userDelete hook call the sharemanager. This will
cleanup to and from this user.

* All shares owned by this user
* All shares with this user (user)
* All custom group shares
* All link share initiated by this user (to avoid invisible link shares)

Unit tests are added for the defaultshare provider as well as the
federated share provider
2016-04-04 14:15:38 +02:00
Roeland Jago Douma
1db82073a4 Generate a valid URL for link notification
fixes #23197

* Updated unit test
2016-03-15 11:10:24 +01:00
Lukas Reschke
c353d51810 Remove Scrutinizer Auto Fixer 2016-03-01 17:48:23 +01:00
Lukas Reschke
933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Lukas Reschke
59028cced0 Add autodiscovery support to server-to-server sharing
Adds autodiscovery support to server-to-server sharing as specified in the specification. If no discovery data is found it is using the fallback ownCloud endpoints for legacy support.
2016-02-26 09:26:55 +01:00
Thomas Müller
776d91f3bc Merge pull request #21854 from owncloud/fix-share-hook-group-add
Fix addUserToGroup hook of the share code
2016-02-25 16:56:19 +01:00
Roeland Jago Douma
9651defe3f Also filter the old share info endpoint
Make sure we do not show an icon if we can't display a share
2016-02-10 17:05:57 +01:00
Joas Schilling
349f3bf54a More fixes 2016-02-09 10:40:00 +01:00
Scrutinizer Auto-Fixer
08f0dc9067 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2016-02-08 15:43:39 +00:00
Roeland Jago Douma
5f521067d8 When a user is removed we should remove the right shares
* This means all the shares directly shared with them
* Or all group shares having a special share with them

This patch fixes the operator precedece (AND before OR).
So before this patch:

(share_with = <deleted user> AND share_type = 0) OR share_type=2

So it deleted all user specific shares

Now:
share_with = <deleted user> AND (share_type = 0 OR (share_type=2)
2016-02-05 10:05:22 +01:00
Joas Schilling
09ae160463 Replace other usages 2016-01-25 17:17:36 +01:00
Morris Jobke
bd456b5889 Fix addUserToGroup hook of the share code
* sets up the filesystem of the user that is added to a group
  to properly accept shares
* fixes #18499
2016-01-22 14:17:37 +01:00
Thomas Müller
682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Roeland Jago Douma
876fb83ddc getMediumStrengthGenerator is deprecated and does not do anything anymore 2016-01-11 20:06:30 +01:00
Roeland Jago Douma
17a066c18e Properly close db cursors 2016-01-08 20:27:01 +01:00
Roeland Jago Douma
629bac22fd Make sure to respect deleted group shares by user 2016-01-08 20:27:01 +01:00
Roeland Jago Douma
c882d46e5f Moved to the query builder
Anything to keep Lukas happy
2016-01-08 20:27:01 +01:00
Roeland Jago Douma
066e3770bb Make sure that permissions stay in sync for share_type 2
When a file/folder is shared with a group and one of the group members
moves this file/folder an extra entry is created in the share table.

When the permission of the group share is updated we used to only
sometimes update the shares for individual users.

* Added intergration tests
2016-01-08 20:27:01 +01:00
Morris Jobke
190cc2bb67 Remove OC_DB::getConnection 2016-01-07 14:54:55 +01:00
Morris Jobke
fddece9552 Remove OC_DB::insertid 2016-01-07 14:54:55 +01:00
Morris Jobke
3917d888bd Remove OC_DB::isError 2016-01-07 14:54:55 +01:00
Björn Schießle
efc030aa25 don't allow to create a federated share if source and target server are the same 2015-12-14 17:16:14 +01:00
Scrutinizer Auto-Fixer
ffc49a24f0 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-10 16:43:37 +01:00
Thomas Müller
bb8dbc291b Merge pull request #21005 from owncloud/verify_password_before_unshare
The ajax code path unshares a link share when updating the password
2015-12-09 10:05:20 +01:00
Vincent Petry
d0cca6c3ad Add explicit check for groups excluded from sharing
Since isSharable() doesn't do the check for groups excluded from
sharing, adding an explicit check in the sharing code.
2015-12-08 16:48:33 +01:00
Roeland Jago Douma
780d80d7c3 The ajax code path unshares a link share when updating the password
In order to not mess up existing shares if the password gets verified we
should first fire this validation.
2015-12-07 16:38:49 +01:00
Thomas Müller
a9e5faf7d0 Merge pull request #20981 from owncloud/issue-19848-multiple-emails-for-sharelink
Allow sending a share email to multiple users
2015-12-07 15:17:19 +01:00
Joas Schilling
5b87413792 Allow sending a share email to multiple users 2015-12-07 10:49:34 +01:00
Roeland Jago Douma
11d8b336e2 [Sharing] Properly check if a group already has access
The old code check was to liberal resulting in wrong matches if a user
with the same name as the group already had access.

Fixes 20892
2015-12-04 12:22:21 +01:00
Thomas Müller
dcc7ff09ba Adding unit test for MailNotifications::sendInternalShareMail() 2015-12-02 21:42:14 +01:00
Thomas Müller
eebe2b9c23 User IUser::getEMailAddress() all over the place 2015-12-02 21:25:05 +01:00
Morris Jobke
baecfc4080 Reduce OC_Config usage in lib/
* replaced by proper public interfaces
2015-12-02 14:49:40 +01:00
Morris Jobke
3061e5d2fc Check the expiration date for null
* null is always less than any value -> expirationDate gets null
  which is "no date set"
* ref https://github.com/owncloud/core/issues/20590#issuecomment-158393075
2015-12-01 17:43:05 +01:00
Björn Schießle
964fa1fce3 use hooks to auto add server to the list of trusted servers once a federated share was created 2015-11-24 11:34:38 +01:00
Thomas Müller
9f69021691 lastInsertId() is properly working with Oracle if the table name is properly passed in 2015-11-23 11:44:08 +01:00
Thomas Müller
9ec2850c78 Use mocks when testing isSharingDisabledForUser 2015-11-19 15:36:16 +01:00
Roeland Jago Douma
402e0afbc5 Fix Error message when sharing outside of group
For #19788
2015-11-09 15:52:17 +01:00
Bjoern Schiessle
4719305e3b cache result from parent folders 2015-11-04 09:27:29 +01:00
Stephen Colebrook
6feb31bf96 Allow separate templates for internal and external share notifications 2015-10-29 10:24:24 +01:00
Lukas Reschke
8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Roeland Jago Douma
9071e756a1 Fix for broken ajax/share.php endpoint
Even more code mess :(
All tests pass again. But I'm really not happy with this endpoint.
2015-10-23 09:24:03 +02:00
Thomas Müller
4f5ff9c105 Ensure the password is only hashed in case it's changed on the client - fixes #19950 2015-10-22 17:32:40 +02:00
Robin Appelman
e46741cf5d detect object homestorage in share code 2015-10-16 21:41:51 +02:00