This is an excellent plugin and I'm working on incorporating this project as module in one of my projects. Unfortunately, I cannot use the plugin as is because my project already has it's own themes and also has an auth and acl system in place. So, I decided to move this plugin bit by bit into my project.
In the pursuit, I discovered that print_account_chart() on View/Accounts/show.ctp has hard coding in the way of if ($account->id <= 4) while printing groups (~ L62) which can be easily replaced with if ($account->g_parent_id === null) to make it dynamic and immune to any changes to id in DB. This new comparison simply checks for the nullparent_id attribute on the AccountList object to show action links.
There are still places where the hard-coded id is used and the app requires it so it won't make much of a difference until it is replaced throughout the app.
Hi,
This is an excellent plugin and I'm working on incorporating this project as module in one of my projects. Unfortunately, I cannot use the plugin as is because my project already has it's own themes and also has an
auth
andacl
system in place. So, I decided to move this plugin bit by bit into my project.In the pursuit, I discovered that
print_account_chart()
onView/Accounts/show.ctp
has hard coding in the way ofif ($account->id <= 4)
while printing groups (~L62
) which can be easily replaced withif ($account->g_parent_id === null)
to make it dynamic and immune to any changes toid
in DB. This new comparison simply checks for thenull
parent_id
attribute on theAccountList
object to show action links.