Skip to content

Commit

Permalink
fix: check permissions before adding environment variables (#212)
Browse files Browse the repository at this point in the history
fix #210
  • Loading branch information
lorenzo-cavazzi authored and rokroskar committed Sep 12, 2019
1 parent 5379935 commit 086a500
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jupyterhub/spawners.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ def start(self, *args, **kwargs):

self.cmd = "jupyterhub-singleuser"

environment = {
variable.key: variable.value for variable in gl_project.variables.list()
}
self.environment.update(environment)
if access_level >= gitlab.MAINTAINER_ACCESS:
environment = {
variable.key: variable.value for variable in gl_project.variables.list()
}
self.environment.update(environment)

result = yield super().start(*args, **kwargs)
return result
Expand Down

0 comments on commit 086a500

Please sign in to comment.