Changeset 78af3d1 in OpenWorkouts-current for ow/models/user.py


Ignore:
Timestamp:
Feb 9, 2019, 9:42:52 PM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
56caf3d
Parents:
55470f9
Message:

Fix permissions. From now on users can see (and edit, delete, etc) their own data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/models/user.py

    r55470f9 r78af3d1  
    66import bcrypt
    77from repoze.folder import Folder
    8 from pyramid.security import Allow
     8from pyramid.security import Allow, Deny, Everyone, ALL_PERMISSIONS
    99
    1010from ow.catalog import get_catalog, reindex_object
     
    1818    def __acl__(self):
    1919        permissions = [
     20            (Allow, str(self.uid), 'view'),
    2021            (Allow, str(self.uid), 'edit'),
    21             (Allow, str(self.uid), 'view'),
     22            (Deny, Everyone, ALL_PERMISSIONS),
    2223        ]
    2324        return permissions
Note: See TracChangeset for help on using the changeset viewer.