]>
Commit | Line | Data |
---|---|---|
1 | #!flask/bin/python | |
2 | from app import db, models | |
3 | from app import tools | |
4 | q = tools.DBQuery() | |
5 | u = models.User.query.get(4) | |
6 | p = models.Portfolio.query.get(1) | |
7 | print (q.get_users(p)) | |
8 | print (q.has_access(u,p)) | |
9 | print (q.can_read(u,p)) | |
10 | print (q.can_write(u,p)) | |
11 | a = models.AccessRight.query.join(models.AccessRight.album).all() | |
12 | #print(a) | |
13 | acls = models.AccessRight.query.filter_by(user = u) | |
14 | for acl in acls: | |
15 | print(acl) | |
16 | a = models.AccessRight.query.join(models.AccessRight.album).filter(acl == acl.id) | |
17 | print(a) | |
18 |