Problem/Motivation

We want to know the username, who triggered the config auto export event.

Proposed resolution

Add Parameter [current user] as pseudo-token and replace the token in Service.php.

Remaining tasks

A patch is attached, can you please review and perhaps add the enhancement to the next release?

usage: add parameter with pseudo-token to cae config parameter like:
currentuser: "[current user]"

CommentFileSizeAuthor
cae_Service.php_.patch1.06 KBheikofischer
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

heikofischer created an issue. See original summary.

jurgenhaas’s picture

Version: 2.0.1 » 2.0.x-dev
Status: Active » Needs work

@heikofischer thanks for the proposal and the patch. Have you tried issue forks before? That's much easier to handle and you don't need matches anymore. Maybe you could do the next revision in a fork?

Regarding the code:

+++ b/modules/contrib/config_auto_export/src/Service.php	(date 1615804788223)
@@ -73,10 +73,11 @@
+    $currentuser = \Drupal::currentUser()->getDisplayName();

This should be replaced with a dependency injection (like the file system too) and the variable name should be camel case.

heikofischer’s picture

@jurgenhaas I`ve created an issue fork and pushed the changes to the new branch, I also created a merge request.
Hope it all fits, that was my first issue fork ;)
Can you please review the changes?

jurgenhaas’s picture

Assigned: Unassigned » jurgenhaas
Status: Needs work » Fixed

@heikofischer looks great, hope you enjoyed the experience with issue fork. At least as a maintainer it is much more convenient as I can review and comment in the browser and if everything is OK, I just click one button and the code is committed.

Just done that, thanks for your contribution.

heikofischer’s picture

Thanks Jürgen

Status: Fixed » Closed (fixed)

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