mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
Roles: can't remove related record from subpanel without "delete" right on related module #3620
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#3620
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jorilx on GitHub (Mar 13, 2019).
In modules that use subpanels to show related records the "remove" button appears only if you have the "delete" right on the RELATED module, not on the main one.
This looks wrong to me, since I'm looking to remove the RELATION between the records, not the related record itself.
For example: I have a "Marketing" user group that needs to handle Targets Lists, and because of this issue if I want to allow them to remove contacts from a targets list I have to grant them the "delete" right on Contacts. I would prefer that they could just fiddle with targets lists, not delete contacts from our CRM :)
Another example: if my user has a role that can view/edit/delete Accounts but can only view Contacts, in the Accounts module I will see no "edit" or "remove" buttons on the Contacts subpanel. The visibility of the "remove" button should be tied to my rights on Accounts, not Contacts, since I'm trying to remove a relation of Accounts, not deleting a Contact.
I think the related code is inside
process_dynamic_listview_rowsfrominclude/ListView/ListViewSubPanel.phpSuiteCRM 7.10.12
@Jorilx commented on GitHub (Mar 13, 2019):
Suggested patch:
@gunnicom commented on GitHub (Mar 13, 2019):
I do not know which is the wanted behaviour here, but it should be consistent.
If you are allowed to remove the relation from one side, you should be able to remove the relation from the other side, too.
@willrennie commented on GitHub (Apr 4, 2019):
Marking this as a suggestion for now. We can see the point of view from both arguments for/against this, but would not deem it as a bug currently.
@Jorilx commented on GitHub (Apr 4, 2019):
I agree it's not a bug, more of a security concern :) This issue makes it necessary to grant to a role more rights than needed (and possibly destructive ones)