1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to restrict to DELETE or UPDATE nodes?

Discussion in 'Drupal' started by philpbvc3232, May 17, 2011.

  1. #1
    hi folks,

    I'd like to implement the function: users can view some nodes, but they cannot delete or update them. First, I trid to rewrite sql query. But I finally found that hook_db_rewrite_sql() never capture DELETE or UPDATE queries. It seems that only SELECT queries can be rewritten. Am I right about that?

    Another way I can do is to restrict users to access the node/%node/delete directory. But I'm worring if there are some DELETE queries to perform, those will bypass such restriction.

    So what is the safe method to restrict DELETE or UPDATE queries?
     
    philpbvc3232, May 17, 2011 IP