Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - #10611 Subpanels don't show related records links when view permission is set to "group" #10612

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

SinergiaCRM
Copy link
Contributor

Description

This PR fixes an issue where subpanels weren't correctly displaying links to related records when the user's role had "Group" view permissions. Previously, when viewing a record's subpanel, related records would show only as plain text instead of clickable links if the user had Group-level view permissions, even when they had access to those records.

The fix adds specific user permission checking logic in the subpanel code to properly evaluate the "View" permission column value, ensuring links are displayed according to the user's actual permissions.

Related issue: #10611

Motivation and Context

This change is required to ensure proper functionality of subpanels when working with security groups and role-based permissions. The previous behavior was inconsistent with how direct relationships were handled and made navigation more difficult for users with group-level permissions.

The fix maintains the security model while improving user experience by showing clickable links when the user actually has permission to view the related record.

How To Test This

  1. As an admin user:
    • Create a regular user (u1)
    • Create a role (r1) setting for Accounts module List=Group and View=Group
    • Create two security groups (g1 and g2)
    • Add u1 to g1
    • Add role r1 to g1
    • Create a project (p1) and assign it to g1
    • Create an account (a1) and assign it to g1
    • Create an opportunity linking p1 and a1, ensuring the opportunity is assigned to g1
    • Create another account (a2) and assign it to g2
    • Create another opportunity linking p1 and a2, ensuring the opportunity is assigned to g1
  2. Login as user u1
  3. Navigate to p1's detail view
  4. Verify in the Opportunities subpanel:
    • The opportunity linked to a1 shows as a clickable link
    • The opportunity linked to a2 shows only the name without a link
    • This behavior correctly reflects the user's group-level view permissions
      image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant