0001-wip.patch
src/authentic2/journal_event_types.py | ||
---|---|---|
22 | 22 | |
23 | 23 | |
24 | 24 |
class UserEvents(EventTypeDefinition): |
25 |
name = 'user' |
|
25 |
name = 'user_events'
|
|
26 | 26 |
label = _('user events') |
27 | 27 |
abstract = True |
28 | 28 | |
29 | 29 | |
30 | 30 |
class UserLogin(UserEvents): |
31 |
name = 'login' |
|
32 |
label = _('login') |
|
31 |
name = 'user_login' |
|
32 |
label = _('user_login') |
|
33 |
trad = "connexion d'un utilisateur" |
|
33 | 34 | |
34 | 35 |
@classmethod |
35 | 36 |
def record(cls, user, session, service, how): |
... | ... | |
60 | 61 | |
61 | 62 | |
62 | 63 |
class UserLoginFailure(UserEvents): |
63 |
name = 'login_failure' |
|
64 |
label = _('login failure') |
|
64 |
name = 'user_login_failure' |
|
65 |
label = _('user login failure') |
|
66 |
trad = "échec de connexion d'un utilisateur" |
|
65 | 67 | |
66 | 68 |
@classmethod |
67 | 69 |
def record(cls, username): |
... | ... | |
77 | 79 | |
78 | 80 | |
79 | 81 |
class UserRequestRegistration(UserEvents): |
80 |
name = 'request_registration' |
|
81 |
label = _('request registration') |
|
82 |
name = 'user_request_registration' |
|
83 |
label = _('user request registration') |
|
84 |
trad = "demande de création de compte" |
|
82 | 85 | |
83 | 86 |
@classmethod |
84 | 87 |
def record(cls, email): |
... | ... | |
93 | 96 | |
94 | 97 | |
95 | 98 |
class UserRegister(UserEvents): |
96 |
name = 'register' |
|
97 |
label = _('register') |
|
99 |
name = 'user_register' |
|
100 |
label = _('user register') |
|
101 |
traduction = "création de compte" |
|
98 | 102 | |
99 | 103 |
@classmethod |
100 | 104 |
def record(cls, user, session, service, how): |
... | ... | |
123 | 127 | |
124 | 128 | |
125 | 129 |
class UserLogout(UserEvents): |
126 |
name = 'logout' |
|
127 |
label = _('logout') |
|
130 |
name = 'user_logout' |
|
131 |
label = _('user logout') |
|
132 |
trad = "déconnexion d'un utilisateur" |
|
128 | 133 | |
129 | 134 |
@classmethod |
130 | 135 |
def record(cls, user, session, service): |
... | ... | |
135 | 140 | |
136 | 141 | |
137 | 142 |
class UserRequestPasswordReset(UserEvents): |
138 |
name = 'request_password_reset' |
|
139 |
label = _('request password reset') |
|
143 |
name = 'password_reset_request' |
|
144 |
label = _('password reset request') |
|
145 |
trad = "demande de réinitialisation de mot de passe" |
|
140 | 146 | |
141 | 147 |
@classmethod |
142 | 148 |
def record(cls, email, user): |
... | ... | |
153 | 159 | |
154 | 160 | |
155 | 161 |
class UserResetPassword(UserEvents): |
156 |
name = 'reset_password' |
|
157 |
label = _('reset password') |
|
162 |
name = 'password_reset' |
|
163 |
label = _('password reset') |
|
164 |
trad = "réinitialisation de mot de passe" |
|
158 | 165 | |
159 | 166 |
@classmethod |
160 | 167 |
def record(cls, user, session, service): |
... | ... | |
165 | 172 | |
166 | 173 | |
167 | 174 |
class UserResetPasswordFailure(UserEvents): |
168 |
name = 'reset_password_failure'
|
|
175 |
name = 'password_reset_failure'
|
|
169 | 176 |
label = _('password reset failure') |
177 |
trad = "échec de réinitialisation de mot de passe" |
|
170 | 178 | |
171 | 179 |
@classmethod |
172 | 180 |
def record(cls, email): |
... | ... | |
177 | 185 | |
178 | 186 | |
179 | 187 |
class UserChangePassword(UserEvents): |
180 |
name = 'change_password' |
|
181 |
label = _('change password') |
|
188 |
name = 'password_change' |
|
189 |
label = _('password change') |
|
190 |
trad = "changement de mot de passe" |
|
182 | 191 | |
183 | 192 |
@classmethod |
184 | 193 |
def record(cls, user, session, service): |
... | ... | |
189 | 198 | |
190 | 199 | |
191 | 200 |
class UserEdit(UserEvents): |
192 |
name = 'edit' |
|
193 |
label = _('edit') |
|
201 |
name = 'user_edition' |
|
202 |
label = _('user edition') |
|
203 |
trad = "édition d'un utilisateur" |
|
194 | 204 | |
195 | 205 |
@classmethod |
196 | 206 |
def record(cls, user, session, service, form=None, old=None, new=None): |
... | ... | |
215 | 225 | |
216 | 226 | |
217 | 227 |
class SSOAuthorize(SSOEvents): |
218 |
name = 'authorize' |
|
219 |
label = _('authorize single sign on') |
|
228 |
name = 'sso_authorization' |
|
229 |
label = _('single sign on authorization') |
|
230 |
trad = "authorisation d'authentification unique" |
|
220 | 231 | |
221 | 232 |
@classmethod |
222 | 233 |
def record(cls, user, session, service, **kwargs): |
... | ... | |
228 | 239 | |
229 | 240 | |
230 | 241 |
class SSOLogin(SSOEvents): |
231 |
name = 'login' |
|
232 |
label = _('single sign on') |
|
242 |
name = 'sso_login' |
|
243 |
label = _('single sign on login') |
|
244 |
trad = "connexion par authentification unique" |
|
233 | 245 | |
234 | 246 |
@classmethod |
235 | 247 |
def record(cls, user, session, service, how): |
src/authentic2/manager/journal_event_types.py | ||
---|---|---|
28 | 28 | |
29 | 29 | |
30 | 30 |
class ManagerEvents(EventTypeDefinition): |
31 |
name = 'manager' |
|
31 |
name = 'manager_events'
|
|
32 | 32 |
label = _('manager events') |
33 | 33 |
abstract = True |
34 | 34 | |
35 | 35 | |
36 | 36 |
class UserEvents(ManagerEvents): |
37 |
name = 'user' |
|
38 |
label = _('user manager events')
|
|
37 |
name = 'user_events'
|
|
38 |
label = _('user events') |
|
39 | 39 |
abstract = True |
40 | 40 | |
41 | 41 | |
42 | 42 |
class UserCreation(UserEvents): |
43 |
name = 'create' |
|
44 |
label = _('create') |
|
43 |
name = 'user_creation' |
|
44 |
label = _('user creation') |
|
45 |
trad = "création d'un utilisateur" |
|
45 | 46 | |
46 | 47 |
@classmethod |
47 | 48 |
def record(cls, user, session, form): |
... | ... | |
60 | 61 | |
61 | 62 | |
62 | 63 |
class EditUser(UserEvents): |
63 |
name = 'edit' |
|
64 |
label = _('edit') |
|
64 |
name = 'user_editing' |
|
65 |
label = _('user editing') |
|
66 |
trad = "édition d'un utilisateur" |
|
65 | 67 | |
66 | 68 |
@classmethod |
67 | 69 |
def record(cls, user, session, form): |
... | ... | |
82 | 84 | |
83 | 85 | |
84 | 86 |
class ChangePassword(UserEvents): |
85 |
name = 'change_password' |
|
86 |
label = _('change password') |
|
87 |
name = 'password_change' |
|
88 |
label = _('password change') |
|
89 |
trad = "changement de mot de passe" |
|
87 | 90 | |
88 | 91 |
@classmethod |
89 | 92 |
def record(cls, user, session, form): |
... | ... | |
110 | 113 | |
111 | 114 | |
112 | 115 |
class ChangeEmailRequest(UserEvents): |
113 |
name = 'request_email_change' |
|
114 |
label = _('request email change') |
|
116 |
name = 'change_email_request' |
|
117 |
label = _('change email request') |
|
118 |
trad = "demande de changement de courriel" |
|
115 | 119 | |
116 | 120 |
@classmethod |
117 | 121 |
def record(cls, user, session, form): |
... | ... | |
162 | 166 | |
163 | 167 | |
164 | 168 |
class ActivateUser(UserEvents): |
165 |
name = 'activation' |
|
166 |
label = _('activate user') |
|
169 |
name = 'user_activation' |
|
170 |
label = _('user activation') |
|
171 |
trad = "activation d'un utilisateur" |
|
167 | 172 | |
168 | 173 |
@classmethod |
169 | 174 |
def record(cls, user, session, target_user): |
... | ... | |
174 | 179 | |
175 | 180 | |
176 | 181 |
class DeactivateUser(UserEvents): |
177 |
name = 'deactivation' |
|
178 |
label = _('deactivate user') |
|
182 |
name = 'user_deactivation' |
|
183 |
label = _('user deactivation') |
|
184 |
trad = "désactivation d'un utilisateur" |
|
179 | 185 | |
180 | 186 |
@classmethod |
181 | 187 |
def record(cls, user, session, target_user): |
... | ... | |
186 | 192 | |
187 | 193 | |
188 | 194 |
class PasswordReset(UserEvents): |
189 |
name = 'send_password_reset_email' |
|
190 |
label = _('send password reset email') |
|
195 |
name = 'password_reset_email' |
|
196 |
label = _('password reset email') |
|
197 |
trad = "courriel de réinitialisation de mot de passe" |
|
191 | 198 | |
192 | 199 |
@classmethod |
193 | 200 |
def record(cls, user, session, target_user): |
... | ... | |
199 | 206 | |
200 | 207 | |
201 | 208 |
class DeleteUser(UserEvents): |
202 |
name = 'delete' |
|
203 |
label = _('delete') |
|
209 |
name = 'user_deletion' |
|
210 |
label = _('user deletion') |
|
211 |
trad = "suppression d'un utilisateur" |
|
204 | 212 | |
205 | 213 |
@classmethod |
206 | 214 |
def record(cls, user, session, target_user): |
... | ... | |
211 | 219 | |
212 | 220 | |
213 | 221 |
class DeleteAuthorization(UserEvents): |
214 |
name = 'delete_authorization' |
|
215 |
label = _('delete authorization') |
|
222 |
name = 'authorization_deletion' |
|
223 |
label = _('authorization deletion') |
|
224 |
trad = "suppression d'une autorisation" |
|
216 | 225 | |
217 | 226 |
@classmethod |
218 | 227 |
def record(cls, user, session, service, target_user): |
... | ... | |
224 | 233 | |
225 | 234 | |
226 | 235 |
class RoleEvents(ManagerEvents): |
227 |
name = 'role' |
|
228 |
label = _('role manager events')
|
|
236 |
name = 'role_management_event'
|
|
237 |
label = _('role management event')
|
|
229 | 238 |
abstract = True |
230 | 239 | |
231 | 240 |
@classmethod |
... | ... | |
246 | 255 | |
247 | 256 | |
248 | 257 |
class CreateRole(RoleEvents): |
249 |
name = 'create' |
|
250 |
label = _('creation') |
|
258 |
name = 'role_creation' |
|
259 |
label = _('role creation') |
|
260 |
trad = "création d'un rôle" |
|
251 | 261 | |
252 | 262 | |
253 | 263 |
class EditRole(RoleEvents): |
254 |
name = 'edit' |
|
255 |
label = _('edit') |
|
264 |
name = 'role_editing' |
|
265 |
label = _('role editing') |
|
266 |
trad = "édition d'un rôle" |
|
256 | 267 | |
257 | 268 |
@classmethod |
258 | 269 |
def record(cls, user, session, role, form): |
... | ... | |
266 | 277 | |
267 | 278 | |
268 | 279 |
class DeleteRole(RoleEvents): |
269 |
name = 'delete' |
|
270 |
label = _('deletion') |
|
280 |
name = 'role_deletion' |
|
281 |
label = _('role deletion') |
|
282 |
trad = "suppression d'un rôle" |
|
271 | 283 | |
272 | 284 | |
273 | 285 |
class AddMember(RoleEvents): |
274 |
name = 'add_member' |
|
275 |
label = _('add member') |
|
286 |
name = 'role_member_addition' |
|
287 |
label = _('role member addition') |
|
288 |
trad = "ajout d'un membre à un rôle" |
|
276 | 289 | |
277 | 290 |
@classmethod |
278 | 291 |
def record(cls, user, session, role, member): |
... | ... | |
296 | 309 | |
297 | 310 | |
298 | 311 |
class RemoveMember(RoleEvents): |
299 |
name = 'remove_member' |
|
300 |
label = _('remove member') |
|
312 |
name = 'role_member_removal' |
|
313 |
label = _('role member removal') |
|
314 |
trad = "suppression d'un membre à un rôle" |
|
301 | 315 | |
302 | 316 |
@classmethod |
303 | 317 |
def record(cls, user, session, role, member): |
... | ... | |
321 | 335 | |
322 | 336 | |
323 | 337 |
class AddChild(RoleEvents): |
324 |
name = 'add_child' |
|
325 |
label = _('add child role') |
|
338 |
name = 'child_role_addition' |
|
339 |
label = _('child role addition') |
|
340 |
trad = "ajout d'un rôle enfant" |
|
326 | 341 | |
327 | 342 |
@classmethod |
328 | 343 |
def record(cls, user, session, parent, child): |
... | ... | |
339 | 354 | |
340 | 355 | |
341 | 356 |
class RemoveChild(RoleEvents): |
342 |
name = 'remove_child' |
|
343 |
label = _('remove child role') |
|
357 |
name = 'child_role_removal' |
|
358 |
label = _('child role removal') |
|
359 |
trad = "suppression d'un rôle enfant" |
|
344 | 360 | |
345 | 361 |
@classmethod |
346 | 362 |
def record(cls, user, session, parent, child): |
... | ... | |
357 | 373 | |
358 | 374 | |
359 | 375 |
class AddAdminRole(RoleEvents): |
360 |
name = 'add_admin_role' |
|
361 |
label = _('add administration by role') |
|
376 |
name = 'admin_role_addition' |
|
377 |
label = _('administration role adition') |
|
378 |
trad = "ajout d'un rôle adminstrateur" |
|
362 | 379 | |
363 | 380 |
@classmethod |
364 | 381 |
def record(cls, user, session, role, admin_role): |
... | ... | |
375 | 392 | |
376 | 393 | |
377 | 394 |
class RemoveAdminRole(RoleEvents): |
378 |
name = 'remove_admin_role' |
|
379 |
label = _('remove administration by role') |
|
395 |
name = 'admin_role_removal' |
|
396 |
label = _('administration role removal') |
|
397 |
trad = "suppression d'un rôle adminstrateur" |
|
380 | 398 | |
381 | 399 |
@classmethod |
382 | 400 |
def record(cls, user, session, role, admin_role): |
... | ... | |
393 | 411 | |
394 | 412 | |
395 | 413 |
class AddAdminUser(RoleEvents): |
396 |
name = 'add_admin_user' |
|
397 |
label = _('add administration by user') |
|
414 |
name = 'admin_user_addition' |
|
415 |
label = _('administration user addition') |
|
416 |
trad = "ajout d'un utilisateur administrateur" |
|
398 | 417 | |
399 | 418 |
@classmethod |
400 | 419 |
def record(cls, user, session, role, admin_user): |
... | ... | |
411 | 430 | |
412 | 431 | |
413 | 432 |
class RemoveAdminUser(RoleEvents): |
414 |
name = 'remove_admin_user' |
|
415 |
label = _('remove administration by user') |
|
433 |
name = 'radmin_user_removal' |
|
434 |
label = _('administration user removal') |
|
435 |
trad = "suppression d'un utilisateur administrateur" |
|
416 | 436 | |
417 | 437 |
@classmethod |
418 | 438 |
def record(cls, user, session, role, admin_user): |
419 |
- |