mirror of
https://github.com/bitwarden/server.git
synced 2025-05-29 23:34:53 -05:00
Add event types
This commit is contained in:
parent
e242539b84
commit
69731ecb9d
@ -9,6 +9,7 @@
|
|||||||
User_Recovered2fa = 1004,
|
User_Recovered2fa = 1004,
|
||||||
User_FailedLogIn = 1005,
|
User_FailedLogIn = 1005,
|
||||||
User_FailedLogIn2fa = 1006,
|
User_FailedLogIn2fa = 1006,
|
||||||
|
User_ExportedVault = 1007,
|
||||||
|
|
||||||
Cipher_Created = 1100,
|
Cipher_Created = 1100,
|
||||||
Cipher_Updated = 1101,
|
Cipher_Updated = 1101,
|
||||||
@ -17,6 +18,12 @@
|
|||||||
Cipher_AttachmentDeleted = 1104,
|
Cipher_AttachmentDeleted = 1104,
|
||||||
Cipher_Shared = 1105,
|
Cipher_Shared = 1105,
|
||||||
Cipher_UpdatedCollections = 1106,
|
Cipher_UpdatedCollections = 1106,
|
||||||
|
Cipher_ClientViewed = 1107,
|
||||||
|
Cipher_ClientToggledPasswordVisible = 1108,
|
||||||
|
Cipher_ClientToggledHiddenFieldVisible = 1109,
|
||||||
|
Cipher_ClientCopiedPassword = 1110,
|
||||||
|
Cipher_ClientCopedHiddenField = 1111,
|
||||||
|
Cipher_ClientAutofilled = 1112,
|
||||||
|
|
||||||
Collection_Created = 1300,
|
Collection_Created = 1300,
|
||||||
Collection_Updated = 1301,
|
Collection_Updated = 1301,
|
||||||
|
@ -39,11 +39,16 @@ namespace Bit.Events.Controllers
|
|||||||
switch(model.Type)
|
switch(model.Type)
|
||||||
{
|
{
|
||||||
// User events
|
// User events
|
||||||
case EventType.User_LoggedIn:
|
case EventType.User_ExportedVault:
|
||||||
await _eventService.LogUserEventAsync(_currentContext.UserId.Value, model.Type);
|
await _eventService.LogUserEventAsync(_currentContext.UserId.Value, model.Type);
|
||||||
break;
|
break;
|
||||||
// Cipher events
|
// Cipher events
|
||||||
case EventType.Cipher_Created:
|
case EventType.Cipher_ClientAutofilled:
|
||||||
|
case EventType.Cipher_ClientCopedHiddenField:
|
||||||
|
case EventType.Cipher_ClientCopiedPassword:
|
||||||
|
case EventType.Cipher_ClientToggledHiddenFieldVisible:
|
||||||
|
case EventType.Cipher_ClientToggledPasswordVisible:
|
||||||
|
case EventType.Cipher_ClientViewed:
|
||||||
if(!model.CipherId.HasValue)
|
if(!model.CipherId.HasValue)
|
||||||
{
|
{
|
||||||
return new BadRequestResult();
|
return new BadRequestResult();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user