I am using Flag 7.x-3.0 to enable users to flag file entities. I only want users to be able to flag files that other users have uploaded. However, I am missing the checkbox option "allow users to flag own content" that I remember having been a part of earlier versions of Flag module.

Has this feature been removed?


joachim’s picture

Category:support» feature
Status:Active» Closed (duplicate)

I am pretty sure that has never existed. There is an issue open for this feature already.

semei’s picture

Status:Closed (duplicate)» Active

Can you be more precise what has never existed? Flag access control does exist for flags of flag type "Nodes", but just not for flags of flag type "File". Is this what you mean?

joachim’s picture

Status:Active» Closed (duplicate)

Turns out I was wrong -- I'd completely forgotten about this feature:

  // Restrict access by authorship. It's important that TRUE is never returned
  // here, otherwise we'd grant permission even if other modules denied access.

This is in flag_flag_access(). It only works for nodes and comments because it's D6-era code that's not been updated for general entities.

Generalizing it would be the job of #879988: Flag permission for 'own entities'. Please search for issues before filing!