Fixups from rebase
This commit is contained in:
parent
7532dff978
commit
21827891f7
@ -14,29 +14,6 @@ class AuditEventQuery(Query):
|
|||||||
|
|
||||||
|
|
||||||
class AuditLog(object):
|
class AuditLog(object):
|
||||||
@classmethod
|
|
||||||
def log_event(cls, user, resource, action):
|
|
||||||
return cls._log(user=user, resource=resource, action=action)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def log_workspace_event(cls, user, workspace, resource, action):
|
|
||||||
return cls._log(
|
|
||||||
user=user, workspace_id=workspace.id, resource=resource, action=action
|
|
||||||
)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def log_update_workspace_role(
|
|
||||||
cls, action, user, updated_user, workspace, previous_role, new_role
|
|
||||||
):
|
|
||||||
return cls._log(
|
|
||||||
action=action,
|
|
||||||
user=user,
|
|
||||||
updated_user=updated_user,
|
|
||||||
workspace_id=workspace.id,
|
|
||||||
previous_role_id=previous_role.id,
|
|
||||||
new_role_id=new_role.id,
|
|
||||||
)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def log_system_event(cls, resource, action):
|
def log_system_event(cls, resource, action):
|
||||||
return cls._log(resource=resource, action=action)
|
return cls._log(resource=resource, action=action)
|
||||||
@ -59,12 +36,6 @@ class AuditLog(object):
|
|||||||
|
|
||||||
audit_event = AuditEventQuery.create(
|
audit_event = AuditEventQuery.create(
|
||||||
user=user,
|
user=user,
|
||||||
updated_user=updated_user,
|
|
||||||
workspace_id=workspace_id,
|
|
||||||
resource_id=resource_id,
|
|
||||||
resource_type=resource_type,
|
|
||||||
previous_role_id=previous_role_id,
|
|
||||||
new_role_id=new_role_id,
|
|
||||||
workspace_id=workspace_id,
|
workspace_id=workspace_id,
|
||||||
resource_id=resource_id,
|
resource_id=resource_id,
|
||||||
resource_type=resource_type,
|
resource_type=resource_type,
|
||||||
|
@ -7,6 +7,7 @@ from atst.domain.workspace_roles import WorkspaceRoles
|
|||||||
from atst.models.workspace_role import Status
|
from atst.models.workspace_role import Status
|
||||||
from atst.models.role import Role
|
from atst.models.role import Role
|
||||||
from atst.models.invitation import Status as InvitationStatus
|
from atst.models.invitation import Status as InvitationStatus
|
||||||
|
from atst.models.audit_event import AuditEvent
|
||||||
from tests.factories import (
|
from tests.factories import (
|
||||||
RequestFactory,
|
RequestFactory,
|
||||||
UserFactory,
|
UserFactory,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user