? Success

User tests: Successful: Unsuccessful:

avatar Mathewlenning
Mathewlenning
13 Mar 2015

Something like this would allow us to pull all the JTable::getInstance('asset') dependencies out of the components.
I also added self cleaning, so we aren't writing null values as denied.

avatar Mathewlenning Mathewlenning - open - 13 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 13 Mar 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 13 Mar 2015
Category Libraries
avatar compojoom
compojoom - comment - 14 Mar 2015

Hey Matthew!
Could you please explain what your use case exactly is & how we can test this?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6410.
avatar compojoom compojoom - test_item - 14 Mar 2015 - Not tested
avatar Mathewlenning
Mathewlenning - comment - 17 Mar 2015

@compojoom Sorry for the delayed response.

The exact use case that this current implementation addresses is in the com_config models, but I'd also like to remove the ref in JTable.

If we look at the code, before saving the rules we always call the JAccessRules class, push the rules array into it, call JTable::getinstance('assets'), bind the rules to the table, then store the rules.

Which IMO requires classes that handle ACL storage to have too much knowledge of the ACL system.
So hiding the details behind the JAccessRules interface will make it easier to maintain ACL without refactoring classes that use it.Does that make sense?

This is how it is meant to be used.

$rules = new JAccessRules();
$rules->storeRules('com_content', $data['rules']);

// We don't need this anymore
unset($data['rules'])

The JTable implementation is a little more complex (as it fixes parent/child relationships), but I'm working on a solution too.

avatar Mathewlenning
Mathewlenning - comment - 28 Sep 2015

Joomla isn't ready for this yet. I'll close it for now and when the core is cleaner I'll revisit it.

avatar Mathewlenning Mathewlenning - close - 28 Sep 2015
avatar Mathewlenning Mathewlenning - change - 28 Sep 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-09-28 01:59:23
Closed_By Mathewlenning

Add a Comment

Login with GitHub to post a comment