Skip to content

Missing System Hook Event for Role Change on a Project/Group

Problem to solve

There are no System Hook Events for when roles change on projects and groups currently.

Intended users

Developers of APIs that rely on System Hooks to create an event based solution instead of a polling/syncing based solution.

Further details

In order to stay in sync with user permissions in Gitlab, there needs to be an event for the system hooks that is triggered when a role for a user changes on a Project and a Group. If you do not have this, you are needing to poll the API all the time to make sure you data is synced instead of writing an event based approach.

Proposal

Add these 2 events (user_update_for_team & user_update_for_group) to the System Hook.

{
                  "created_at": "2012-07-21T07:30:56Z",
                  "updated_at": "2012-07-21T07:38:22Z",
                  "event_name": "user_update_for_team",
                "old_access_level": "Guest",
                "access_level": "Maintainer",
                  "project_id": 74,
                "project_name": "StoreCloud",
                "project_path": "storecloud",
 "project_path_with_namespace": "jsmith/storecloud",
                  "user_email": "johnsmith@gmail.com",
                   "user_name": "John Smith",
               "user_username": "johnsmith",
                     "user_id": 41,
          "project_visibility": "visibilitylevel|private"
}

{
    "created_at": "2012-07-21T07:30:56Z",
    "updated_at": "2012-07-21T07:38:22Z",
    "event_name": "user_update_for_group",
  "old_group_access": "Guest",
  "group_access": "Maintainer",
      "group_id": 78,
    "group_name": "StoreCloud",
    "group_path": "storecloud",
    "user_email": "johnsmith@gmail.com",
     "user_name": "John Smith",
 "user_username": "johnsmith",
       "user_id": 41
}

Permissions and Security

N/A

Testing

Theoretically there shouldn't be any old functionality it would affect. That said, I am not familiar with the core code ;-)

What does success look like, and how can we measure that?

Success is the events are sent to the registered system hook APIs

Links / references