currentfeature/docs
Last change
on this file since 5ec3a0b was
5ec3a0b,
checked in by borja <borja@…>, 5 years ago
|
Imported sources from the old python2-only repository:
- Modified the code so it is python 3.6 compatible
- Fixed deprecation warnings, pyramid 1.10.x supported now
- Fixed deprecation warnings about some libraries, like pyramid-simpleform
- Added pytest-pycodestyle and pytest-flakes for automatic checks on the
source code files when running tests.
- Added default pytest.ini setup to enforce some default parameters when
running tests.
- Cleaned up the code a bit, catched up with tests coverage.
|
-
Property mode set to
100644
|
File size:
392 bytes
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | def groupfinder(user_id, 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 | if user_id in request.root.all_usernames(): |
---|
12 | return [user_id] |
---|
13 | return [] |
---|
Note: See
TracBrowser
for help on using the repository browser.