If the variable EMU_SHORTCODE is set, then the
shortcode is appended to the username found in okta
This commit is contained in:
Родитель
66405d392a
Коммит
e775cf152d
|
@ -67,6 +67,8 @@ OKTA_PRIVATE_KEY='{"kty": "RSA", ...}'
|
|||
## Who to assign the issues to
|
||||
#ISSUE_ASSIGNEE=githubber
|
||||
## Sync schedule, cron style schedule
|
||||
## Shortcode for emu accounts
|
||||
#EMU_SHORTCODE=volcano
|
||||
|
||||
## Default (hourly): 0 * * * *
|
||||
SYNC_SCHEDULE=0 * * * *
|
||||
|
|
|
@ -70,6 +70,8 @@ class Okta:
|
|||
username = getattr(user.profile, self.USERNAME_ATTRIBUTE)
|
||||
username = username.split("@")[0]
|
||||
username = re.sub('[^0-9a-zA-Z-]+', '-', username)
|
||||
if "EMU_SHORTCODE" in os.environ:
|
||||
username = username + "_" + os.environ["EMU_SHORTCODE"]
|
||||
member_list.append(
|
||||
{
|
||||
"username": username,
|
||||
|
|
Загрузка…
Ссылка в новой задаче