<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>Scheduler uses a hook_form_alter to add the scheduling dates to the node form. That's where the access check belongs. In that function, either create the fields (authorized) or not (not authorized) to the form. Then scheduler_node_update can check the presence of the field. BTW, it should probably be the same way in D6 (except "hook_nodeapi('update'...").<BR> </DIV>
<P><FONT color=#ff007f size=4 face="bookman old style, new york, times, serif"><EM><STRONG>Nancy</STRONG></EM></FONT></P>
<P> </P>
<P><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></P>
<DIV><BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: Courier New, monaco, monospace, sans-serif; FONT-SIZE: 10pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Pierre Rineau <pierre.rineau@makina-corpus.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> development@drupal.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sat, February 5, 2011 8:55:18 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [development] hook_node_*()<BR></FONT><BR>On Sat, 2011-02-05 at 20:31 +0100, Eric Schaefer wrote:<BR>> Hi List,<BR>> <BR>> I was just wondering. Now that there are separate hooks for the node<BR>> API, is it necessary to check for permissions in every hook? E.g. The<BR>> scheduler module has a permission for scheduling nodes. Do I need to<BR>> check for that permission in lets say scheduler_node_update()?<BR><BR>No, don't. The full access check is menu based. Implementation of your<BR>hooks are pure API therefore shouldn't care about right (except for the<BR>view related stuff).<BR><BR>Higher level API should
take care of the user rights, not the low level<BR>API IMHO.<BR><BR>Pierre.<BR><BR></DIV></DIV></div></body></html>