Orga + Consent
This commit is contained in:
@@ -50,6 +50,10 @@ type AbstractResource struct {
|
||||
// NOT in a separate collection.
|
||||
// Visibility-filtered per requesting peer before any response is sent.
|
||||
ExploitationAuthorizations []ExploitationAuthorization `json:"exploitation_authorizations,omitempty" bson:"exploitation_authorizations,omitempty"`
|
||||
|
||||
// Consents lists the consent questions the user must acknowledge before
|
||||
// scheduling this resource. Consents with Optional=true may be skipped.
|
||||
Consents []Consent `json:"consents,omitempty" bson:"consents,omitempty"`
|
||||
}
|
||||
|
||||
func (ri *AbstractResource) Extend(typ ...string) map[string][]tools.DataType {
|
||||
@@ -100,6 +104,11 @@ func (r *AbstractResource) GetExploitationAuthorizations() []ExploitationAuthori
|
||||
return r.ExploitationAuthorizations
|
||||
}
|
||||
|
||||
// GetConsents returns the consent questions declared by this resource.
|
||||
func (r *AbstractResource) GetConsents() []Consent {
|
||||
return r.Consents
|
||||
}
|
||||
|
||||
// FilterExploitationAuthorizations removes AEs that are not visible to peerID.
|
||||
// Must be called before serializing the resource for a consumer peer.
|
||||
// The resource owner (CreatorID) always sees all AEs unfiltered.
|
||||
|
||||
Reference in New Issue
Block a user