Created on 14 June 2016, almost 9 years ago
Updated 25 April 2025, 1 day ago

The access check is mostly right:

  if(!isset($account) || $account->uid==0 || $op!='update' 
  || !isset ($node) || $account->uid == $node->uid 
  || !user_permission('access node by reference', $account) ){
    return NODE_ACCESS_IGNORE;
  }

However, the last one is wrong. It should be user_access() not user_permission(). Like this:

  if(!isset($account) || $account->uid==0 || $op!='update' 
  || !isset ($node) || $account->uid == $node->uid 
  || !user_access('access node by reference', $account) ){
    return NODE_ACCESS_IGNORE;
  }

Once that is changed, it should force that users have the access permission in order to use the module... as currently running, any authenticated user can use the module.

Thanks!

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dandaman

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024