|
@@ -16,17 +16,6 @@ from tracim.models.context_models import LoginCredentials
|
16
|
16
|
from tracim.models.data import UserRoleInWorkspace
|
17
|
17
|
|
18
|
18
|
|
19
|
|
-class ProfileSchema(marshmallow.Schema):
|
20
|
|
- slug = marshmallow.fields.String(
|
21
|
|
- attribute='name',
|
22
|
|
- validate=OneOf(Profile._NAME),
|
23
|
|
- example='managers',
|
24
|
|
- )
|
25
|
|
-
|
26
|
|
- class Meta:
|
27
|
|
- description = 'User Profile, give user right on whole Tracim instance.'
|
28
|
|
-
|
29
|
|
-
|
30
|
19
|
class UserSchema(marshmallow.Schema):
|
31
|
20
|
|
32
|
21
|
user_id = marshmallow.fields.Int(dump_only=True, example=3)
|
|
@@ -64,9 +53,10 @@ class UserSchema(marshmallow.Schema):
|
64
|
53
|
"If no avatar, then set it to null "
|
65
|
54
|
"(and frontend will interpret this with a default avatar)",
|
66
|
55
|
)
|
67
|
|
- profile = marshmallow.fields.Nested(
|
68
|
|
- ProfileSchema,
|
69
|
|
- many=False,
|
|
56
|
+ profile = marshmallow.fields.String(
|
|
57
|
+ attribute='profile',
|
|
58
|
+ validate=OneOf(Profile._NAME),
|
|
59
|
+ example='managers',
|
70
|
60
|
)
|
71
|
61
|
|
72
|
62
|
class Meta:
|