if i have no right use the flag "Accepted",please hide it when user have no permission use flag "Accepted",how to hide it instead of when clicking and tell them "you have no permission"?

I found a function on flag.module: function template_preprocess_flag(&amp;$variables) ,

but it seems not a hook to reuse...
I just added this to my sites/all/themes/mytheme/template.php file and it worked after clearing the theme registry:

function mytheme_preprocess_flag(&amp;$variables) {
  // Do something here
  dpm($variables);  // Pretty print $variables if you have the Devel module installed
}


That should give you a nudge in the right direction.