Index: flag.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/Attic/flag.inc,v
retrieving revision 1.1.2.18
diff -u -F^[^a-z]*function -r1.1.2.18 flag.inc
--- flag.inc	10 Oct 2008 17:00:01 -0000	1.1.2.18
+++ flag.inc	12 Oct 2008 15:18:22 -0000
@@ -331,11 +331,13 @@   function user_access($account = NULL) 
    *   The ID of the item to flag or unflag.
    * @param $account
    *   The user on whose behalf to flag. Leave empty for the current user.
+   * @param $skip_permission_check
+   *   Flag the item even if the $account user don't have permission to do so.
    * @return
    *   FALSE if some error occured (e.g., user has no permission, flag isn't
    *   applicable to the item, etc.), TRUE otherwise.
    */
-  function flag($action, $content_id, $account = NULL) {
+  function flag($action, $content_id, $account = NULL, $skip_permission_check = FALSE) {
     if (!isset($account)) {
       $account = $GLOBALS['user'];
     }
@@ -352,7 +354,7 @@   function flag($action, $content_id, $a
       return FALSE;
     }
     
-    if (!$this->user_access($account)) {
+    if (!$skip_permission_check && !$this->user_access($account)) {
       // User has no permission to use this flag.
       return FALSE;
     }
