Class Organisation
Represents an organisation in the identity system.
Inherited Members
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.EntityFrameworkCore.dll
Syntax
public class Organisation : ListOrganisation, IOrganisation, IEventAggregate, IHaveClaims, IMultitenantEntity, IEventSourced
Remarks
The top level organisation can be a tenant, but child organisations are not.
Constructors
Organisation()
Properties
Claims
Navigation property for the claims this organisation possesses.
Declaration
public virtual ICollection<OrganisationClaim> Claims { get; }
Property Value
|
System.Collections.Generic.ICollection<OrganisationClaim>
|
Created
Gets or sets the date and time, in UTC, when the organisation was created.
Declaration
public DateTimeOffset Created { get; set; }
Property Value
|
System.DateTimeOffset
|
Implements
GroupMotherId
Gets or sets the Id of the group mother (root organisation) in the organisation tree.
Declaration
public Guid GroupMotherId { get; set; }
Property Value
|
System.Guid
|
Implements
Remarks
For the group mother, this value will be the same as Id.
Parent
ParentId
Gets the identity of this tenants parent, if any.
Declaration
public Guid? ParentId { get; set; }
Property Value
|
System.Nullable<System.Guid>
|
Implements
Subsidiaries
Gets a collection of subsidiaries organisations. WARNING: An organisaiton can have subsidiaries, even if the collection is empty, because a complete tree is never loadded from the database.
Declaration
[ForeignKey("ParentId")]
public List<Organisation> Subsidiaries { get; }
Property Value
|
List<Organisation>
|
TrustedDomains
Gets a collection of trusted domain that the organisation owns and therefor want to allow users with e-mail addresses from that domain to sign-up.
Declaration
[ForeignKey("OrganisationId")]
public List<TrustedDomain> TrustedDomains { get; }
Property Value
|
List<TrustedDomain>
|
Methods
AddClaim(String, String)
Adds a claim to the organisation.
Declaration
public void AddClaim(string claimType, string claimValue)
Parameters
|
String
claimType
The type of claim. |
|
String
claimValue
The value of the claim. |
Implements
AddTrustedDomain(String)
Adds domainName as a trusted domain for this organisation.
Declaration
public void AddTrustedDomain(string domainName)
Parameters
|
String
domainName
The domain name to add. |
Implements
GetClaims()
Gets a collection of claims for this person.
Declaration
public virtual IEnumerable<Claim> GetClaims()
Returns
|
IEnumerable<System.Security.Claims.Claim>
A collection of claims. |
Implements
RaiseEvent(IEvent)
Adds an event to the aggregate. The added event will be handled if an IEventSourceRepository is configured.
Declaration
public virtual void RaiseEvent(IEvent event)
Parameters
|
IEvent
event
The IEvent to add to the aggregate. |
Implements
RemoveClaim(Int32)
Removes the claim with id.
Declaration
public void RemoveClaim(int id)
Parameters
|
System.Int32
id
The id of the claim to remove. |
Implements
RemoveTrustedDomain(String)
Removes domainName as a trusted domain for this organisation.
Declaration
public void RemoveTrustedDomain(string domainName)
Parameters
|
String
domainName
The domain name to delete. |
Implements
Explicit Interface Implementations
IMultitenantEntity.TenantId
Declaration
Guid IMultitenantEntity.TenantId { get; set; }
Returns
|
System.Guid
|
Implements
IOrganisation.Claims
Declaration
IEnumerable<OrganisationClaim> IOrganisation.Claims { get; }
Returns
|
IEnumerable<OrganisationClaim>
|
Implements
IOrganisation.Parent
IOrganisation.Subsidiaries
Declaration
IEnumerable<IOrganisation> IOrganisation.Subsidiaries { get; }
Returns
|
IEnumerable<IOrganisation>
|
Implements
IOrganisation.TrustedDomains
Declaration
IEnumerable<ITrustedDomain> IOrganisation.TrustedDomains { get; }
Returns
|
IEnumerable<ITrustedDomain>
|
Implements
IEventSourced.ClearUncommittedEvents()
Declaration
void IEventSourced.ClearUncommittedEvents()
Implements
IEventSourced.GetUncommittedEvents()
Declaration
IEnumerable<IEvent> IEventSourced.GetUncommittedEvents()
Returns
|
IEnumerable<IEvent>
|
Implements
IEventSourced.LoadFromEvents(IEnumerable<IEvent>)
Declaration
void IEventSourced.LoadFromEvents(IEnumerable<IEvent> events)
Parameters
|
IEnumerable<IEvent>
events
|
Implements
IEventSourced.Version
Declaration
int IEventSourced.Version { get; set; }
Returns
|
System.Int32
|