-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d734857
commit dced965
Showing
24 changed files
with
117 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from carbonserver.api.schemas import User | ||
|
||
USER_ID_1 = "f52fe339-164d-4c2b-a8c0-f562dfce066d" | ||
|
||
ORGANIZATION_ID = "c13e851f-5c2f-403d-98d0-51fe15df3bc3" | ||
ORGANIZATION_ID_2 = "c13e851f-5c2f-403d-98d0-51fe15df3bc4" | ||
DUMMY_USER = User( | ||
id=USER_ID_1, | ||
name="Gontran Bonheur", | ||
email="gontran.bonheur@gmail.com", | ||
organizations=[ORGANIZATION_ID, ORGANIZATION_ID_2], | ||
is_active=True, | ||
) | ||
|
||
|
||
class FakeUserWithAuthDependency: | ||
auth_user = {"sub": USER_ID_1} | ||
db_user = DUMMY_USER | ||
|
||
|
||
class FakeAuthContext: | ||
@staticmethod | ||
def isOperationAuthorizedOnOrg(*args, **kwargs): | ||
return True | ||
|
||
@staticmethod | ||
def isOperationAuthorizedOnProject(*args, **kwargs): | ||
return True |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.