Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 0.1.0 #1

Merged
merged 39 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ea541c7
add code
untitledds Nov 30, 2024
fa17298
small fix actions
untitledds Nov 30, 2024
79d5696
small fix dockerfile
untitledds Nov 30, 2024
ce8481f
fix actions
untitledds Nov 30, 2024
2b2cb76
fix name in actions
untitledds Nov 30, 2024
b3ddac5
name
untitledds Nov 30, 2024
cb430e7
Update connector.py
untitledds Dec 1, 2024
a2f2b1c
Update connector.py
untitledds Dec 1, 2024
e3271b3
Update services.py
untitledds Dec 1, 2024
19c2de1
Update config.snippet.py
untitledds Dec 1, 2024
cd59fa6
Update services.py
untitledds Dec 1, 2024
019eb3c
Update services.py
untitledds Dec 1, 2024
7a20f36
Update connector.py
untitledds Dec 1, 2024
d2d49ef
Update connector.py
untitledds Dec 1, 2024
c69f3ae
Update services.py
untitledds Dec 1, 2024
55deddc
Update config.snippet.py
untitledds Dec 1, 2024
e0f1372
Create default.env
untitledds Dec 2, 2024
958510e
Update services.py
untitledds Dec 2, 2024
e8aa535
Update connector.py
untitledds Dec 2, 2024
c77d25b
Update services.py
untitledds Dec 2, 2024
2e6c67e
Update connector.py
untitledds Dec 2, 2024
2f54aaa
Update config.snippet.py
untitledds Dec 2, 2024
6f791ab
Update config.snippet.py
untitledds Dec 2, 2024
5d223d4
Update services.py
untitledds Dec 2, 2024
47013e6
Update config.snippet.py
untitledds Dec 2, 2024
36446a5
Update default.env
untitledds Dec 2, 2024
d37bd20
Update services.py
untitledds Dec 2, 2024
38068c3
Update services.py
untitledds Dec 2, 2024
b2324ff
Update README.md
untitledds Dec 2, 2024
e51c1a4
Update services.py
untitledds Dec 2, 2024
88147a9
Update config.snippet.py
untitledds Dec 2, 2024
f5ab5eb
Update default.env
untitledds Dec 2, 2024
fc80d66
Update services.py
untitledds Dec 2, 2024
db543f6
Update services.py
untitledds Dec 2, 2024
97cbc31
Update config.snippet.py
untitledds Dec 2, 2024
868354b
Update default.env
untitledds Dec 2, 2024
d2810ce
Update services.py
untitledds Dec 2, 2024
fe68a22
Update LICENSE
untitledds Dec 2, 2024
ac8d348
Create RELEASE_NOTES.md
untitledds Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update services.py
untitledds authored Dec 2, 2024
commit e51c1a4b3f59dc73ed8f6146c4fa7d2b8eee01e5
13 changes: 5 additions & 8 deletions back/taiga_contrib_access_token_auth/services.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import logging
import re
from django.db import transaction as tx
from django.apps import apps
from django.conf import settings
@@ -18,14 +17,12 @@
DEFAULT_ROLE = settings.DEFAULT_ROLE

def determine_role_and_project(groups):
role_project_pattern = re.compile(r'^(.*):(.*)$')
for group in groups:
match = role_project_pattern.match(group)
if match:
role = match.group(1).upper()
project = match.group(2).upper()
if project in PROJECTS:
return role, PROJECTS[project]
parts = group.split(':')
if len(parts) == 2:
role, project = parts
if project.upper() in PROJECTS:
return role.upper(), PROJECTS[project.upper()]
return None, None

@tx.atomic