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