6.0.0-alpha14
7/3/25

[#11388] Application's API configuration can not be dynamically altered
Summary Application's API configuration can not be dynamically altered
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 3. High
Owners slusarz (at) horde (dot) org
Requester slusarz (at) horde (dot) org
Created 08/30/2012 (4690 days ago)
Due
Updated 10/15/2012 (4644 days ago)
Assigned
Resolved 08/31/2012 (4689 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/15/2012 08:35:56 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (develop):

commit cd01b022a5790c529d73986491d44904cd014cff
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu Aug 30 16:29:24 2012 -0600

     [mms] Allow application API interface to dynamically alter 
properties (Bug #11388).

  folks/lib/Api.php                         |   13 ++--
  framework/Core/lib/Horde/Registry.php     |   90 
++++++++++++-----------------
  framework/Core/lib/Horde/Registry/Api.php |   59 +++++++++++++++++--
  framework/Core/package.xml                |    4 +-
  imp/lib/Api.php                           |    2 +-
  ingo/docs/CHANGES                         |   10 +---
  ingo/lib/Api.php                          |   37 ++++++++----
  ingo/package.xml                          |   17 +-----
  kronolith/lib/Api.php                     |    2 +-
  nag/lib/Api.php                           |    2 +-
  sam/lib/Api.php                           |    2 +-
  timeobjects/lib/Api.php                   |    2 +-
  turba/lib/Api.php                         |    4 +-
  wicked/lib/Api.php                        |    2 +-
  14 files changed, 136 insertions(+), 110 deletions(-)

http://git.horde.org/horde-git/-/commit/cd01b022a5790c529d73986491d44904cd014cff
08/31/2012 02:33:16 AM Michael Slusarz Taken from Horde DevelopersHorde Developers
State ⇒ Resolved
 
08/31/2012 02:26:29 AM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit cd01b022a5790c529d73986491d44904cd014cff
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu Aug 30 16:29:24 2012 -0600

     [mms] Allow application API interface to dynamically alter 
properties (Bug #11388).

  folks/lib/Api.php                         |   13 ++--
  framework/Core/lib/Horde/Registry.php     |   90 
++++++++++++-----------------
  framework/Core/lib/Horde/Registry/Api.php |   59 +++++++++++++++++--
  framework/Core/package.xml                |    4 +-
  imp/lib/Api.php                           |    2 +-
  ingo/docs/CHANGES                         |   10 +---
  ingo/lib/Api.php                          |   37 ++++++++----
  ingo/package.xml                          |   17 +-----
  kronolith/lib/Api.php                     |    2 +-
  nag/lib/Api.php                           |    2 +-
  sam/lib/Api.php                           |    2 +-
  timeobjects/lib/Api.php                   |    2 +-
  turba/lib/Api.php                         |    4 +-
  wicked/lib/Api.php                        |    2 +-
  14 files changed, 136 insertions(+), 110 deletions(-)

http://git.horde.org/horde-git/-/commit/cd01b022a5790c529d73986491d44904cd014cff
08/30/2012 10:29:19 PM Michael Slusarz Comment #1
Priority ⇒ 3. High
Patch ⇒ No
Milestone ⇒
Assigned to Horde DevelopersHorde Developers
Assigned to Michael Slusarz
Queue ⇒ Horde Framework Packages
Summary ⇒ Application's API configuration can not be dynamically altered
Type ⇒ Bug
State ⇒ Assigned
Reply to this comment
Currently, we cache all API details.  This cache creation prevents 
dynamically altering the API object itself though (e.g. you can't 
dynamically disable API calls or add API links in __construct()).

We need to rethink/refactor API caching.  One option would be to cache 
the API objects themselves.  However, this would either 1) require the 
autoloader to be properly configured for ALL applications before 
unserializing or 2) adding autoloading code to the API object itself.   
Neither is desirable.

Instead, caching of the API may not be viable and we should remove it 
and load an application's API object on-demand.  Additionally, we 
should make the object's properties (disabled, links, noPerms) 
protected so that they have to be routed through the object's __get() 
method - then an object can override the __get() method as needed to 
add/disable elements.

This is blocking on Horde 5.0.

Saved Queries