?
avatar smehrbrodt
smehrbrodt
16 Nov 2016

When creating or editing a module, the information when and by whom the module was created/edited is missing.
I suggest to add that information to the modules table, as it is in the content table:

  • created: Timestamp
  • created_by: User ID
  • modified: Timestamp
  • modified_by: User ID
avatar smehrbrodt smehrbrodt - open - 16 Nov 2016
avatar joomla-cms-bot joomla-cms-bot - change - 16 Nov 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 16 Nov 2016
Category Modules
avatar mbabker
mbabker - comment - 16 Nov 2016

Initially, I don't really see the value in adding these columns. Especially the created by for the user as that generally has other implications throughout the system as well (i.e. ACL).

avatar smehrbrodt
smehrbrodt - comment - 16 Nov 2016

Hm I don't know about other implications, but my use case is that, in a multi-admin environment, can track who did the last change (and when) to a module.

avatar mbabker
mbabker - comment - 16 Nov 2016

Modified is probably "safer" (I still don't personally see the use for it in core, you could do this activity logging more thoroughly and probably better overall just as easily with a plugin catching onXXXAfterSave), but adding the created fields generally has other implications/uses that don't necessarily apply to modules (i.e. with categories edit.own permission uses the created_by field for the user ID).

avatar smehrbrodt
smehrbrodt - comment - 16 Nov 2016

Ok, understood your point. But isn't having full ACL on modules a desirable thing? Or are there performance reasons why we shouldn't do this?

avatar andrepereiradasilva
andrepereiradasilva - comment - 16 Nov 2016

if you have created_by you need to add core.edit.own ACL processing in all modules processing (where core.edit ACL check exists for com_modules.module.xx basicly).

avatar mbabker
mbabker - comment - 16 Nov 2016

But isn't having full ACL on modules a desirable thing?

I guess it depends. I never personally saw the use in having per-module ACL but apparently I've never run into those cases where I'd benefit from it either. The sites and teams I've worked with have never necessitated a need to only be able to edit certain modules.

Or are there performance reasons why we shouldn't do this?

Some will tell you there's no need for per-item ACL in general, I know at least one company whose first action on any performance related issue is to just delete all com_content.article.X assets as it's a major performance issue. How I don't know personally, never debugged that to understand it, but I guess there is some less than optimal performance in the ACL system overall from the sounds of it.

avatar andrepereiradasilva
andrepereiradasilva - comment - 16 Nov 2016

Maybe ACL checks can be a performance issue in huge sites.

JAccess preloads all assets for a particular component in a single query (see https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/access/access.php#L312) so it doesn't have to make a query for each asset that is checked on page generation (and they can be a lot when you are not logged as super user).

This is a good performance improvement in sites with small to medium ACL tables - one query returns all assets for that component (imagine a page with 10+ modules when logged with registered user), but probably when you have 10.000 article assets it will have some memory/performance issues, since it's a query that can return up to 10.000 rows.

Not really tested, but in theory...

avatar brianteeman brianteeman - change - 1 Dec 2016
Status New Confirmed
avatar brianteeman brianteeman - change - 1 Dec 2016
Category Modules Feature Request Modules
avatar brianteeman
brianteeman - comment - 20 May 2017

i am closing this at this time as there doesnt seem to be any interest in creating the necessary code for this change to even see if it is feasible. It can always be reopened if there is a code proposal

avatar brianteeman brianteeman - change - 20 May 2017
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2017-05-20 09:23:04
Closed_By brianteeman
avatar brianteeman brianteeman - close - 20 May 2017

Add a Comment

Login with GitHub to post a comment