Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Model.Audit.Types
- type MonadAudit c m = (MonadHasRequest c m, MonadHas (Id Party) c m, MonadDB c m)
- getRemoteIp :: MonadHasRequest c m => m PGInet
- getAuditIdentity :: (MonadHasRequest c m, MonadHas (Id Party) c m) => m AuditIdentity
Documentation
module Model.Audit.Types
type MonadAudit c m = (MonadHasRequest c m, MonadHas (Id Party) c m, MonadDB c m) Source #
A context which carries enough information to enter audit data along with viewing or data modification actions. The request allows us to get the web requests IP. The party id provides us with the party who is performing auditable actions. The DB gives us a connection to create data in the audit tables.
getRemoteIp :: MonadHasRequest c m => m PGInet Source #
Retrieve the IP from the web request, if any is present
getAuditIdentity :: (MonadHasRequest c m, MonadHas (Id Party) c m) => m AuditIdentity Source #
Build up an identity summarizing the party and IP during a given action