Feb 12, 2020 | 2 min read
Working with contribution-focused clients allows us to contribute work we do to help the community at large. A few months back, we got the chance to contribute on an issue to GitLab, helping any Lagoon users who use it for their repos. Our RBAC system allows users and companies to assign roles with different permissions via our API. It’s also possible to sync the permissions from a hosted GitLab instance using system hooks.
Engineers at amazee.io noticed that Lagoon wasn’t reflecting changes when roles and permissions were changed in GitLab. Since one of our clients needed this functionality, they essentially sponsored us to fix it, and I got the chance to dive in to solve the issue.
The permissions were correctly adjusted when users were added or removed, and those changes would be reflected in Lagoon. But if a users role was changed within GitLab, Lagoon wouldn’t reflect the changes. In order to fix this, we needed to update the system hooks that Lagoon uses to get information about role assignments.
But first, I needed to set up the tools and learn the processes of contributing to GitLab. I also needed to learn a new language — Ruby on Rails. Once I was familiar with everything, I created a fix based on the existing system hooks that allow for changes to roles. The main challenge was writing and running the tests. GitLab, as an open-source company creates an infrastructure to have experts ready to help contributors. My work coincided with GitLab’s Q3 Hackathon which meant there was even more support in place to help run the tests and get the PR ready to merge. I even won a prize!
We’re proud to work with clients who share our commitment to contribution and give us the opportunity to learn, explore, and help out open source communities whenever we can.
You can learn more about this project here: