Comments (4)
Not reproducible on 10.13.0-beta1 with both activity 2.7.1 and 2.7.2:
![image](https://private-user-images.githubusercontent.com/12248713/261021859-b763b01c-f699-4d0d-b392-7bc79af67374.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM2NzE2MzgsIm5iZiI6MTcxMzY3MTMzOCwicGF0aCI6Ii8xMjI0ODcxMy8yNjEwMjE4NTktYjc2M2IwMWMtZjY5OS00ZDBkLWIzOTItN2JjNzlhZjY3Mzc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDIxVDAzNDg1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViMzkzNDI0ZDMwMjNjMWEzYmJkYWQ3NjQ0NGVlMTBmNzdiZTUwOGZhY2E3NjY2NzMxMWQ5YzU3MzI0YjU2M2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.umEcAQkTxTzIXGdaGj3t2aw4zhE8gLZl5DwzNjUUfwQ)
from activity.
Reproducible when the option Automatically accept new incoming local user shares
is opted out by the single user rather than by the admin itself for all the users.
from activity.
Problem is the following:
- Given the following group
test group
havinguser1
anduser2
as members - And given the admin did not modify the option
Automatically accept new incoming local user shares
, which is by default enabled - And given
user1
opted this option out in his/her personal settings page (section sharing), whileuser2
did not - When user
admin
shares folderfor test group
with this group, this is how the oc_share table looks like:
MariaDB [owncloud10130activity]> select * from oc_share;
+----+------------+------------+-----------+---------------+--------+-----------+-------------+-------------+-------------+-----------------+-------------+------------+----------+------------+-------+-----------+------------+------------+
| id | share_type | share_with | uid_owner | uid_initiator | parent | item_type | item_source | item_target | file_source | file_target | permissions | stime | accepted | expiration | token | mail_send | share_name | attributes |
+----+------------+------------+-----------+---------------+--------+-----------+-------------+-------------+-------------+-----------------+-------------+------------+----------+------------+-------+-----------+------------+------------+
| 57 | 1 | test group | admin | admin | NULL | folder | 196 | NULL | 196 | /for test group | 31 | 1692255908 | 0 | NULL | NULL | 0 | NULL | NULL |
| 58 | 2 | user1 | admin | admin | 57 | folder | 196 | NULL | 196 | /for test group | 31 | 1692255908 | 1 | NULL | NULL | 0 | NULL | NULL |
+----+------------+------------+-----------+---------------+--------+-----------+-------------+-------------+-------------+-----------------+-------------+------------+----------+------------+-------+-----------+------------+------------+
2 rows in set (0.000 sec)
- a new subshare entry will be created for every user who opted out (
user1
only in this case) having statusaccepted
equal to1
, which means a pending share, while the parent group share hasaccepted
set to0
, which means accepted - when logging in
user1
will indeed see this share as pending in his/herShared with you
section but no notification bells will appear.
This is done by the following code https://github.com/owncloud/core/blob/master/apps/files_sharing/lib/Controller/Share20OcsController.php#L590-L600, which checks if the share is a group share and if $globalAutoAccept
is set, and for every user having !$userAutoAccept
it creates a subshare with status pending.
Problem is that there the parent group share is not set to status pending as well, so we end up in https://github.com/owncloud/core/blob/master/apps/files_sharing/lib/Service/NotificationPublisher.php#L79-L81 and no notification will be created.
Even if we set the status to pending for the parent group share in Share20OcsController.php, https://github.com/owncloud/core/blob/master/apps/files_sharing/lib/Service/NotificationPublisher.php#L52-L61 will create a notification for all group members, even those who chose to automatically accept shares...
Not sure this can be fixed. Maybe @jvillafanez @phil-davis @IljaN you see a solution here.
from activity.
I don't know if it's possible, but maybe the state of the group share should be dynamically evaluated based on the subshares: if there is at least a pending subshare, the group share should also be pending. The additional problem is that the notification is sent based on the share not on the the subshares.
My main worry is that the change could break more things, and I'm not sure how much we need to test
from activity.
Related Issues (20)
- Expired federated share has wrong activity message on sharee activity
- No update on activity after federated share has been expired on sharer activity HOT 1
- Activity log lost when restored from trashbin to shared folder HOT 3
- [QA] 2.7.1 Testplan HOT 2
- activity 2.7.1 release HOT 1
- [QA] All activity mails lost their date, not only expiry mails HOT 6
- [QA] Group name is wrong in expiry mail HOT 1
- Bring time from the mail with config option back HOT 2
- Various tests are failing in nightly HOT 12
- type `file_deleted` does not match `shared` HOT 4
- Daily tarballs are not updated HOT 13
- Nightly failure in phpstan
- Release activity 2.7.2 HOT 2
- [QA] 2.7.2 Testplan HOT 1
- `js-tests` failure in nightly
- [QA] activity mail notofication for shared folder has wrong timestamp HOT 6
- [QA] hard failure `apiActivity/list.feature:1254 test` in nightly
- Missing Icons Activity App OwnCloud
- Infinite loop if sending emails fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activity.