adamfoneil / Dapper.CX

A Crud library based on Dapper
MIT License
8 stars 1 forks source link

add an IPermission interface #6

Closed adamfoneil closed 4 years ago

adamfoneil commented 4 years ago

This would bring it to Postulate parity I think

adamfoneil commented 4 years ago

I think it would look like this

public interface IPermissible
{
    bool AllowGet(IEnumerable<Claim> claims); // for enforcing tenant isolation
    bool AllowDelete(IEnumerable<Claim> claims);
    bool AllowSave(IEnumerable<Claims> claims);
}

And the Crud methods would need to accept IEnumerable<Claim> args

adamfoneil commented 4 years ago

This is part of AO.Models now in the form of IPermission -- it's not exactly as spec'd above, but gist is the same.