Commit graph

278 commits

Author SHA1 Message Date
Joas Schilling
09ae160463 Replace other usages 2016-01-25 17:17:36 +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
Roeland Jago Douma
8fdb12f8fb Check for error when resharing 2015-10-16 20:43:17 +02:00
Roeland Jago Douma
9e86d71cc5 When sharing with the owner show the path
The error message should contain the path that is being shared not the
numeric id.
2015-10-16 20:43:17 +02:00
Thomas Müller
3e87560033 Merge pull request #19727 from owncloud/fix_19678
Return path instead of itemsource
2015-10-14 12:38:38 +02:00
Roeland Jago Douma
06aaa059d1 Squash collection shares
If folder1 is shared to user2 and user3. And folder1/folder2 is shared
to user4 and user5 then getting all the users with access to
folder1/folder2 should only list user2 and user 3 once.

Previously this was done twice since we request the info two times.

This fix makes sure that we only append unique results to the array.

* Added test
2015-10-13 10:05:49 +02:00
Roeland Jago Douma
585e9cb0e9 Return path instead of itemsource
Fixes #19678

Errors should contain paths and not internal ids
2015-10-13 09:00:33 +02:00
Robin Appelman
59cf817308 Merge pull request #19511 from owncloud/etag-share-permissions-update
Mark shares as dirty when changing permissions
2015-10-06 18:09:12 +02:00
Thomas Müller
48ef5b6b3b OC_Log not longer exists 2015-10-06 14:18:22 +02:00
Robin Appelman
0817024e6f Mark shares as dirty when changing permissions 2015-10-06 11:38:41 +02:00
Thomas Müller
0385a62363 Merge pull request #19597 from owncloud/update-license-headers
update licence headers via script
2015-10-06 11:18:35 +02:00
Thomas Müller
da640adf68 Merge pull request #19577 from owncloud/share-donotreturnentrieswhenusernotingroup
Remove invalid share items from result when missing group membership
2015-10-06 09:24:22 +02:00
Morris Jobke
b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Vincent Petry
1c7244c120 Remove invalid share items from result when missing group membership
Group shares usually have subshare entries for every user. In some
situations it can happen that the user was removed from the group but
the subshare entries still exist.

This fix makes sure that such subshare entries are not returned any more
as the user isn't in the group any more.
2015-10-05 17:21:34 +02:00
Joas Schilling
3bbb65998f Make sure all variables are defined 2015-10-05 12:03:36 +02:00
Joas Schilling
8de0773214 Make sure the share we found is for the same item 2015-10-05 11:55:37 +02:00
Roeland Jago Douma
9a373cb5bb Do not blindy copy expiration date on reshare
If a file/folder is reshared we should not blindly copy the expiration
date of the parent share. User/Group shares do not have expiration dates
currently, and thus this is always set to null.

Fixes #19119

* Added testcase
2015-09-25 13:06:05 +02:00
Vincent Petry
1911472b88 Discard expiration date from result for non-link shares 2015-09-17 13:45:26 +02:00
Arthur Schiwon
c17d022ca4 started to implement sharee list view. not completed yet, do not cry please. 2015-09-16 07:23:27 +02:00
Arthur Schiwon
ffd4e0dc5a split off expirationView 2015-09-16 07:23:26 +02:00