source: OpenWorkouts-current/ow/security.py @ 929097a

currentfeature/docs
Last change on this file since 929097a was 39b1497, checked in by borja <borja@…>, 5 years ago

Replaced user_id leftovers with uid

  • Property mode set to 100644
File size: 380 bytes
Line 
1
2
3def 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    if uid in request.root.all_usernames():
12        return [uid]
13    return []
Note: See TracBrowser for help on using the repository browser.