viewsets_config.yml 4.74 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# THIS FILE IS DYNAMICALLY USED FOR THE BACKEND AND THE FRONTEND
# TAKE CARE WHEN MODYFING IT ;)

#################################################
#  It contains information regarding
#  how viewsets are configured.
#  A restart of the backend server and a full
#  recompile of the frontend is required
#  for changes it to take effect.
#################################################


# Look at the documentation about config files to know more about this
# http://localhost:5000/#/Application/Backend/config_files?id=viewsets_configyml
# https://rex-dri.gitlab.utc.fr/rex-dri/documentation/#/Application/Backend/config_files?id=viewsets_configyml


#####################################################
## Custom Viewsets that doesn't have a model behind
#####################################################
AppModerationStatusViewSet:
  api_end_point: serverModerationStatus
  import_location: other_viewsets
  viewset_permission: ReadOnly
  is_api_view: true

#####################
## Standard Viewsets
#####################

CountryViewSet:
  import_location: country
  api_end_point: countries
  viewset_permission: IsStaff | ReadOnly

CityViewSet:
  import_location: city
  api_end_point: cities
  viewset_permission: IsStaff | NoPost

UniversityViewSet:
  import_location: university
  api_end_point: universities
  viewset_permission: IsStaff | NoPost

CampusViewSet:
  import_location: campus
  api_end_point: campuses


UserDataViewSet:
  import_location: user
  api_end_point: userData
  api_name: user-data-detail
  viewset_permission: IsOwner


TagViewSet:
  import_location: tag
  api_end_point: tags
  viewset_permission: IsStaff | ReadOnly

CurrencyViewSet:
  import_location: currency
  api_end_point: currencies
  viewset_permission: IsStaff | ReadOnly

DepartmentViewSet:
  import_location: other_core
  api_end_point: departments
  viewset_permission: IsStaff | ReadOnly

SpecialtyViewSet:
  import_location: other_core
  api_end_point: specialties
  viewset_permission: IsStaff | ReadOnly

OfferViewSet:
  import_location: other_core
  api_end_point: offers
  viewset_permission: IsStaff | ReadOnly


CountryTaggedItemViewSet:
  import_location: country
  api_end_point: countryTaggedItems
  api_attr: (?P<country_id>[a-zA-Z]+)

CountryScholarshipViewSet:
  import_location: country
  api_end_point: countryScholarships
  api_attr: (?P<country_id>[a-zA-Z]+)

CountryDriViewSet:
  import_location: country
  api_end_point: countryDri
  api_attr: (?P<country_id>[a-zA-Z]+)
  viewset_permission: IsStaff | IsDri | NoPost



CityTaggedItemViewSet:
  import_location: city
  api_end_point: cityTaggedItems
  api_attr: (?P<city_id>[0-9]+)



UniversityTaggedItemViewSet:
  import_location: university
  api_end_point: universityTaggedItems
  api_attr: (?P<univ_id>[0-9]+)

UniversityScholarshipViewSet:
  import_location: university
  api_end_point: universityScholarships
  api_attr: (?P<univ_id>[0-9]+)

UniversityInfoViewSet:
  import_location: university
  viewset_permission: IsStaff | NoPost
  api_end_point: universitiesInfo

UniversitySemestersDatesViewSet:
  import_location: university
  api_end_point: universitiesSemestersDates
  viewset_permission: IsStaff | NoPost

UniversityDriViewSet:
  import_location: university
  api_end_point: universityDri
  api_attr: (?P<univ_id>[0-9]+)
  viewset_permission: IsStaff | IsDri | NoPost



CampusTaggedItemViewSet:
  import_location: campus
  api_end_point: campusTaggedItems
  api_attr: (?P<campus_id>[0-9]+)

MainCampusViewSet:
  import_location: campus
  api_end_point: mainCampuses
  viewset_permission: ReadOnly



RecommendationViewSet:
  import_location: user
  api_end_point: userRecommendations

RecommendationListViewSet:
  import_location: user
  api_end_point: userRecommendationLists

PreviousDepartureViewSet:
  import_location: user
  api_end_point: universitiesPreviousDepartures
  viewset_permission: ReadOnly

PreviousDepartureFeedbackViewSet:
  import_location: user
  api_end_point: universitiesPreviousDepartureFeedback



PendingModerationViewSet:
  import_location: abstract.my_model
  api_end_point: pendingModeration
  viewset_permission: IsStaff


VersionViewSet:
  import_location: abstract.my_model
  api_end_point: versions
  api_attr: (?P<content_type_id>[0-9]+)/(?P<object_pk>[0-9A-Za-z]+)
  api_name: versionsList
  viewset_permission: IsStaff | ReadOnly

PendingModerationObjViewSet:
  import_location: abstract.my_model
  api_end_point: pendingModerationObj
  api_attr: (?P<content_type_id>[0-9]+)/(?P<object_pk>[0-9A-Za-z]+)
  api_name: pendingModerationObj
  viewset_permission: ReadOnly

ForTestingModerationViewSet:
  import_location: abstract.my_model
  api_end_point: test/moderation
  requires_testing: true

ForTestingVersioningViewSet:
  import_location: abstract.my_model
  api_end_point: test/versioning
  requires_testing: true