|
@@ -6,7 +6,7 @@ import typing as typing
|
6
|
6
|
|
7
|
7
|
from tracim.models.auth import User
|
8
|
8
|
|
9
|
|
-# TODO - G.M -28-03-2018 - Check if "current user" stuff is always needed for tracimv2
|
|
9
|
+# TODO - G.M -28-03-2018 - [CurrentUser] Check if "current user" stuff is always needed for tracimv2
|
10
|
10
|
# CURRENT_USER_WEB = 'WEB'
|
11
|
11
|
# CURRENT_USER_WSGIDAV = 'WSGIDAV'
|
12
|
12
|
|
|
@@ -55,7 +55,7 @@ class UserApi(object):
|
55
|
55
|
if email and self._user and user.user_id==self._user.user_id:
|
56
|
56
|
pass
|
57
|
57
|
# this is required for the _session to keep on being up-to-date
|
58
|
|
- # TODO - G.M - 28-03-2018 - Check for pyramid equivalent
|
|
58
|
+ # TODO - G.M - 28-03-2018 - [CurrentUser] Check for pyramid equivalent
|
59
|
59
|
# tg.request.identity['repoze.who.userid'] = email
|
60
|
60
|
# tg.auth_force_login(email)
|
61
|
61
|
|
|
@@ -91,7 +91,7 @@ class UserApi(object):
|
91
|
91
|
:return:
|
92
|
92
|
"""
|
93
|
93
|
# NOTE: Cyclic import
|
94
|
|
- # TODO - G.M - 28-03-2018 - Reenable Calendar stuff
|
|
94
|
+ # TODO - G.M - 28-03-2018 - [Calendar] Reenable Calendar stuff
|
95
|
95
|
#from tracim.lib.calendar import CalendarManager
|
96
|
96
|
#from tracim.model.organisational import UserCalendar
|
97
|
97
|
|
|
@@ -101,6 +101,7 @@ class UserApi(object):
|
101
|
101
|
self._session.flush()
|
102
|
102
|
transaction.commit()
|
103
|
103
|
|
|
104
|
+ # TODO - G.M - 28-03-2018 - [Calendar] Reenable Calendar stuff
|
104
|
105
|
# calendar_manager = CalendarManager(created_user)
|
105
|
106
|
# calendar_manager.create_then_remove_fake_event(
|
106
|
107
|
# calendar_class=UserCalendar,
|
|
@@ -108,6 +109,7 @@ class UserApi(object):
|
108
|
109
|
# )
|
109
|
110
|
|
110
|
111
|
|
|
112
|
+# TODO - G.M - 28-03-2018 - [CurrentUser] Check for pyramid equivalent
|
111
|
113
|
# class CurrentUserGetterInterface(object):
|
112
|
114
|
# def get_current_user(self) -> typing.Union[None, User]:
|
113
|
115
|
# raise NotImplementedError()
|
|
@@ -117,7 +119,7 @@ class UserApi(object):
|
117
|
119
|
# def __init__(self) -> None:
|
118
|
120
|
# self.api = UserApi(None)
|
119
|
121
|
|
120
|
|
-# TODO - G.M - 28-03-2018 - Check for pyramid equivalent
|
|
122
|
+
|
121
|
123
|
# class WebCurrentUserGetter(BaseCurrentUserGetter):
|
122
|
124
|
# def get_current_user(self) -> typing.Union[None, User]:
|
123
|
125
|
# # HACK - D.A. - 2015-09-02
|
|
@@ -132,7 +134,7 @@ class UserApi(object):
|
132
|
134
|
#
|
133
|
135
|
# return None
|
134
|
136
|
|
135
|
|
-# TODO - G.M - 28-03-2018 - Reenable Webdav stuff
|
|
137
|
+# TODO - G.M - 28-03-2018 - [Webdav] Reenable Webdav stuff
|
136
|
138
|
# class WsgidavCurrentUserGetter(BaseCurrentUserGetter):
|
137
|
139
|
# def get_current_user(self) -> typing.Union[None, User]:
|
138
|
140
|
# if hasattr(cherrypy.request, 'current_user_email'):
|