Changeset 78af3d1 in OpenWorkouts-current for ow/tests/models/test_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/tests/models/test_user.py

    r55470f9 r78af3d1  
    33
    44import pytest
    5 from pyramid.security import Allow
     5from pyramid.security import Allow, Everyone, Deny, ALL_PERMISSIONS
    66
    77from ow.models.root import OpenWorkouts
     
    3333    def test__acl__(self, root):
    3434        uid = str(root['john'].uid)
    35         permissions = [(Allow, uid, 'edit'), (Allow, uid, 'view')]
     35        permissions = [
     36            (Allow, uid, 'view'),
     37            (Allow, uid, 'edit'),
     38            (Deny, Everyone, ALL_PERMISSIONS),
     39        ]
    3640        assert root['john'].__acl__() == permissions
    3741
Note: See TracChangeset for help on using the changeset viewer.