consolidate node admin checks

rcourtna - December 4, 2007 - 22:14
Project:Organic groups
Version:5.x-4.1
Component:og.module
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

og.module checks "node_access('update', $node)" all over the place to determine if the logged in user should have access to several Og admin features, such as emailing all subscribers, promoting/booting subscribers, etc.

The attached patch simply consolidates all these node_access checks to a "og_is_node_admin" function.

This allows developers (like me :-)) to manipulate the conditions that determine who the Og admin is for a particular node, without changing code all over the place.

AttachmentSize
og.module.patch4.99 KB

#1

rcourtna - December 4, 2007 - 22:16

I should add that the patch was applied against the HEAD (Revision 1.298.2.113) of the DRUPAL-5 branch from CVS

#2

moshe weitzman - January 14, 2008 - 03:26

looks good ... in the future, please don't mark your own patches as status=RTBC

#3

moshe weitzman - January 25, 2008 - 15:43
Status:patch (reviewed & tested by the community)» fixed

committed. thanks.

#4

Anonymous (not verified) - February 8, 2008 - 15:51
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.