Relationship deletion types will not work correctly if the user does not have permission to all the Objects affected

Fix Priority

4

Components

Affects versions

Labels

Git Pull Request

Description

Summary:
Relationship deletion types will not work correctly if the user does not have permission to all the Objects affected

Steps to Reproduce:

  1. Go to Objects

  2. Create an Object A and an Object B with a field

  3. Go to Object A and create a Relationship One to Many with Object B

  4. Choose any Relationship Deletion Type

  5. Create a Layout with that contains the Relationship tab for Object A

  6. Publish them

  7. Add some entries on Object B and one entry on Object A

  8. Click on the Object A entry and add relations with the entries from Object B

  9. Go to Roles

  10. Create a Role > Define Permissions

  11. Search for Object A

  12. Give it all permissions

  13. Create a new user and assign the created Role to it

  14. Log in with the new user

  15. Go to Object A and delete its entry

  16. Log in with Test Test

  17. Go to Object B and click to view any entry

Expected Result:

  • Prevent: Entry cannot be deleted

  • Cascade: Entry is deleted and all its relations entries on Object B are deleted too

  • Disassociate: Entry is deleted and all its relations entries on Object B are dissociated

Actual Result:
Entry is deleted for any Deletion Type selected and its ID keep being displayed on the Relationship field on Object B entries

Verified on master: 2ef2546d5f8ce61aaecc9898bdd386cc6f29aae1

Attachments

1

Activity

Show:

Mateus Sandes LisboaApril 12, 2023 at 10:10 AM
Edited

Test Result: PASSED. Manual testing following the steps in the description.

Verified on master:
MySQL: 5.7 | Tomcat: 9.0.73
Evidence:

Luiz JardimJuly 27, 2022 at 1:14 PM

Hey ,

The expected result is the following from Object A:

  • Prevent: Entry cannot be deleted

    • User can't delete the entry doesn't matter the permission in the related object

  • Cascade: Entry is deleted and all its relations entries on Object B are deleted too

    • User can only delete the entry if they have permission of deleting in the related object

  • Disassociate: Entry is deleted and all its relations entries on Object B are dissociated

    • User should be able to delete the entry doesn't matter the permission in the related object

cc:

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Zendesk Support

Created October 8, 2021 at 8:27 AM
Updated November 8, 2024 at 8:01 PM
Resolved April 12, 2023 at 10:11 AM