currentfeature/docs
Last change
on this file since 6d9d4a5 was
1d92bf2,
checked in by borja <borja@…>, 5 years ago
|
(#37) Allow login using email address instead of username:
- Use user uids as keys in the root folder for referencing
user objects (instead of username)
- Use uids for referencing users all over the place (auth,
permissions, traversal urls, etc)
- Replaced the username concept with nickname. This nickname
will be used as a shortcut to access "public profile" pages
for users
- Reworked lots of basic methods in the OpenWorkouts root object
(s/username/nickname, marked as properties some methods like
users, emails, etc)
- Added new add_user() and delete_user() helpers to the OpenWorkouts
root object
- Fixed bug in the dashboard redirect view, causing an endless loop
if an authenticated user does not exist anymore when loading a
page.
- Lots of tests fixes, adaptations and catch up.
|
-
Property mode set to
100644
|
File size:
421 bytes
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | def groupfinder(uid, request): |
---|
4 | """ |
---|
5 | Return the groups a user belongs to. |
---|
6 | |
---|
7 | So far, each user has its own group, we will use that to limit access so |
---|
8 | users can access only their own workouts. We will expand it later on to |
---|
9 | allow other users to view workouts from a given user |
---|
10 | """ |
---|
11 | user = request.root.get_user_by_uid(str(uid)) |
---|
12 | if user is not None: |
---|
13 | return [str(user.uid)] |
---|
14 | return [] |
---|
Note: See
TracBrowser
for help on using the repository browser.