mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
events for collections, groups, and org users
This commit is contained in:
@ -63,7 +63,31 @@ namespace Bit.Core.Services
|
||||
return;
|
||||
}
|
||||
|
||||
var e = new CipherEvent(cipher, type, _currentContext?.UserId);
|
||||
var e = new CipherEvent(cipher, _currentContext?.UserId, type);
|
||||
await _eventRepository.CreateAsync(e);
|
||||
}
|
||||
|
||||
public async Task LogCollectionEventAsync(Collection collection, EventType type)
|
||||
{
|
||||
var e = new CollectionEvent(collection, _currentContext.UserId.Value, type);
|
||||
await _eventRepository.CreateAsync(e);
|
||||
}
|
||||
|
||||
public async Task LogGroupEventAsync(Group group, EventType type)
|
||||
{
|
||||
var e = new GroupEvent(group, _currentContext.UserId.Value, type);
|
||||
await _eventRepository.CreateAsync(e);
|
||||
}
|
||||
|
||||
public async Task LogOrganizationUserEventAsync(OrganizationUser organizationUser, EventType type)
|
||||
{
|
||||
var e = new OrganizationUserEvent(organizationUser, _currentContext.UserId.Value, type);
|
||||
await _eventRepository.CreateAsync(e);
|
||||
}
|
||||
|
||||
public async Task LogOrganizationEventAsync(Organization organization, EventType type)
|
||||
{
|
||||
var e = new OrganizationEvent(organization, _currentContext.UserId.Value, type);
|
||||
await _eventRepository.CreateAsync(e);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user