It is redundant and was originally used just as a way to test the access control system. It should be replaced with ($table_name.uid = $account->uid). This will eliminate one row per activity in the access table. Big ++

Comments

sirkitree’s picture

Maybe you can illustrate this with a patch? I'm not really sure what you mean.

Scott Reynolds’s picture

Status: Active » Needs review
StatusFileSize
new1.94 KB

sure heres the patch.

So it removes the use of a grant with module = 'activity' and value = $GLOBAL['user']->uid. Prevents that from being added to teh db and prevents the overhead on the where part on a joined table.

Faster and better practice. I put it in there like this originally so I could test it with multiple access controls. I am confident it passes that test now, so we should remove it.

Scott Reynolds’s picture

Title: Remove the activity access control » Remove the unneeded access table row

updating title to better reflect what this means.

Scott Reynolds’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Scott Reynolds’s picture

Status: Closed (fixed) » Active

Ok after discussing this: #693156: Use <none> to not print message I think this just needs to be rolled back. And that includes rolling back this change as you can guarantee that you will have access records then? #574218: If no activity access records written, message might not show I guess not as modules could alter away all access records. But in that case, why write the Activity to the database if no one can pull them out?

Scott Reynolds’s picture

Status: Active » Needs review

Ok I like this patch. Essentially, we make Activity module itself use its own API for Access control. So it provides the realm activity_actor => uid

It allows admins to say whether or not to record it, and it shows off the api. I want to get a variable_set/get pair for counting the modules that provide realms before this goes in. using that variable set and get we can determine when a admin adds a module, if the activity access table should be rebuilt.

Scott Reynolds’s picture

StatusFileSize
new5.21 KB

hmm heres the patch.

Scott Reynolds’s picture

Status: Needs review » Fixed
sirkitree’s picture

Wow, this is a great idea, and simplifies things - ingenious++

Status: Fixed » Closed (fixed)
Issue tags: -activity2alpha

Automatically closed -- issue fixed for 2 weeks with no activity.