add new endpoint to get organisations and services for a user

contains orgs, and unmapped services.

the orgs contain nested services - services the user is a part of that
belong to that org.

the unmapped services are any services that the user is a part of that
either don't have an org or have one that the user doesn't know about
This commit is contained in:
Leo Hemsted
2018-03-07 18:31:18 +00:00
parent efec57db01
commit 91fa475645
2 changed files with 40 additions and 1 deletions

View File

@@ -120,7 +120,7 @@ class User(db.Model):
organisations = db.relationship(
'Organisation',
secondary='user_to_organisation',
backref=db.backref('user_to_organisation', lazy='dynamic'))
backref=db.backref('users', lazy='dynamic'))
@property
def password(self):