Commit 6f2d2f44 authored by Christophe de Vienne's avatar Christophe de Vienne
Browse files

[schema] Add composite on a few relations

The following behaviors are expected :

*   ExternalAuthProvider deletion should delete the linked ExternalAuthService
    and ExternalIdentity.

*   OAuth2Session should be deleted if its 'external_identity' or 'service' is
    deleted
parent d84042e5113e
sync_schema_props_perms('provider')
sync_schema_props_perms('identity_of')
sync_schema_props_perms('service')
......@@ -69,7 +69,8 @@ class ExternalAuthService(EntityType):
'delete': ('managers',)
},
cardinality='1*',
inlined=True
inlined=True,
composite='object'
)
application_name = String(
maxsize=64, description="Application name",
......@@ -96,7 +97,8 @@ class ExternalIdentity(EntityType):
'read': ('managers', 'users'),
'add': ('managers',),
'delete': ('managers',)
}
},
composite='object'
)
identity_of = SubjectRelation(
'CWUser', cardinality='?*', inlined=True,
......@@ -104,7 +106,8 @@ class ExternalIdentity(EntityType):
'read': ('managers', 'users',),
'add': ('managers',),
'delete': ('managers',)
}
},
composite='object'
)
uid = String(
required=True,
......@@ -137,7 +140,8 @@ class OAuth2Session(EntityType):
'read': ('managers', 'users',),
'add': ('managers',),
'delete': ('managers',)
}
},
composite='object'
)
access_token = String(required=True, unique=True)
active = Boolean(required=True, default=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment