[development] access control for periodicals - does my plan make sense?

Dave Cohen drupal at dave-cohen.com
Sun Sep 24 00:26:36 UTC 2006


On Saturday 23 September 2006 11:54, Jeff Eaton wrote:
> Dave Cohen wrote:
> > So my plan is to put some logic in hook_nodeapi.  If $op == 'view', and
> > the user has not subscribed to the node in question, I can do something
> > like:
> >
> >     $node->body = t('Sorry, you have to subscribe to view this.');
>
> In Drupal 4.7, the Premium module uses a similar approach. I think
> you'll do pretty well with it. Under Drupal 5.0, it's a little more
> complicated but follows the same basic pattern. Looking at the code for
> Premium.module will definitely give you a good start.
>

Thanks for the pointer.  Premium defines a hook so that I can customize the 
logic that grants permission.  Maybe I can use Premium as part of my 
solution.



More information about the development mailing list