Additional status check for license permission when UID is 0

Created on 8 April 2015, over 10 years ago
Updated 19 August 2025, 5 days ago

I noticed this assumption in commerce_license_access(), and I think it's a bit too broad. Patch attached to add a further condition that checks the license status.

  if (isset($license) && $op == 'view') {
    // If there's no user attached, the license is still in checkout, so
    // allow it to be viewed freely.
    if ($license->uid == 0) {
      return TRUE;
    }
πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom pjcdawkins

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024