Skip to content

Commit 2fea9be

Browse files
committed
fix: TT-131 remove role field
1 parent e8a1df4 commit 2fea9be

File tree

3 files changed

+1
-24
lines changed

3 files changed

+1
-24
lines changed

tests/time_tracker_api/users/users_namespace_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from flask import json
33
from flask.testing import FlaskClient
44
from flask_restplus._http import HTTPStatus
5-
from utils.azure_users import AzureConnection
65
from pytest import mark
76

87

time_tracker_api/users/users_namespace.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from faker import Faker
22
from flask_restplus import fields, Resource
3-
from flask_restplus._http import HTTPStatus
43

5-
from time_tracker_api.api import common_fields, api, NullableString
4+
from time_tracker_api.api import common_fields, api
65
from time_tracker_api.security import current_user_id
76

87
from utils.azure_users import AzureConnection
@@ -26,12 +25,6 @@
2625
description='Email of the user that belongs to the tenant',
2726
example=Faker().email(),
2827
),
29-
'role': NullableString(
30-
title="User's Role",
31-
max_length=50,
32-
description='Role assigned to the user by the tenant',
33-
example=Faker().word(['time-tracker-admin']),
34-
),
3528
'roles': fields.List(
3629
fields.String(
3730
title='Roles',
@@ -46,19 +39,6 @@
4639

4740
user_response_fields.update(common_fields)
4841

49-
user_role_input_fields = ns.model(
50-
'UserRoleInput',
51-
{
52-
'role': NullableString(
53-
title="User's Role",
54-
required=True,
55-
max_length=50,
56-
description='Role assigned to the user by the tenant',
57-
example=Faker().word(['time-tracker-admin']),
58-
),
59-
},
60-
)
61-
6242

6343
@ns.route('')
6444
class Users(Resource):

utils/azure_users.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ def __init__(self, config=MSConfig):
7272
self.config = config
7373
self.access_token = self.get_token()
7474

75-
self.role_field = 'extension_1d76efa96f604499acc0c0ee116a1453_role'
76-
7775
def get_token(self):
7876
response = self.client.acquire_token_for_client(
7977
scopes=self.config.SCOPE

0 commit comments

Comments
 (0)