commit | 4fbfede24b238d4c1b577c06a431cff059f08866 | [log] [tgz] |
---|---|---|
author | Dariusz Luksza <dariusz.luksza@gmail.com> | Fri Mar 01 17:57:05 2024 +0000 |
committer | Dariusz Luksza <dariusz.luksza@gmail.com> | Sat May 04 18:41:38 2024 +0100 |
tree | a7f81058527bbce3735b4c138fe68bdf4163ca69 | |
parent | 896e18e0f253450844c33eac00cf8210a0da33fb [diff] |
Track user activity in a persistent cache Add a new Groovy script `track-active-users-1.0.groovy` to track user activities by entering their `id` and timestamp into `track-active-users_cache` persistent cache. The tracking is implemented as a side effect on a new `GroupBackend` implementation that handles all group `UUID`'s. This way our backend `membershipsOf(CurrentUser)` method will be called whenever any group membership resolution is done. This gives us a single place to get the user activities for all supported entry points (UI, REST, SSH, git-over-http). The impact of on the user group resolution should be neglectable and should be equal to the performance of the persistent cache `get()` and `put()` calls. The user activity timestamp is stored with one-minute precision. Bear in mind, that in the case of git-over-http access to public repositories, even when the user provides authentication details, Gerrit will not consult any of the `GroupBackend`'s. This means that clones and fetches of publicly visible repositories will not be counted as user activity. Bug: Issue Issue 327730871 Change-Id: I5827288d40bba4c6b1e7b20d9aae822db8eabc29
This repository contains a collection of Gerrit scripting plugins that are intended to provide simple and useful extensions.
Gerrit needs to be able to recognise the scripts syntax and being able to load them as plugins.
In order to be able to run Groovy scripts, you need to install first the Groovy scripting provider and then copy the Groovy scripts under your Gerrit /plugins directory.
Similarly for Scala scripts, you need to install the Scala scripting provider and then copy the Scala scripts under your Gerrit /plugins directory.