Checkpoint commit on total revamp of Authority

This commit is contained in:
Rick Falkvinge
2015-04-17 23:32:26 +02:00
parent 84dc9ea820
commit d3c81343b9
18 changed files with 196 additions and 429 deletions
+1 -15
View File
@@ -217,22 +217,8 @@ namespace Swarmops.Utility.BotCode
Person person = membership.Person;
// Remove all roles and responsibilities for this person in the org
// TODO: Check for positions that expire with membership
Authority authority = person.GetAuthority();
foreach (BasicPersonRole basicRole in authority.LocalPersonRoles)
{
PersonRole personRole = PersonRole.FromBasic (basicRole);
if (personRole.OrganizationId == membership.OrganizationId)
{
PWEvents.CreateEvent (EventSource.PirateBot, EventType.DeletedRole, person.Identity,
personRole.OrganizationId, personRole.GeographyId, person.Identity,
(int) personRole.Type,
string.Empty);
personRole.Delete();
}
}
// Mail