ash/enforcer.go
func WhitelistReadableFields(fields ...string) *Enforcer {
	return E("ash/WhitelistReadableFields", fire.Except(fire.Delete, fire.ResourceAction, fire.CollectionAction), func(ctx *fire.Context) error {
		// set new list
		ctx.ReadableFields = fire.Intersect(ctx.ReadableFields, fields)

		return nil
	})
}
func WhitelistReadableFields(fields ...string) *Enforcer {
	return E("ash/WhitelistReadableFields", fire.Except(fire.Delete, fire.ResourceAction, fire.CollectionAction), func(ctx *fire.Context) error {
		// set new list
		ctx.ReadableFields = fire.Intersect(ctx.ReadableFields, fields)

		return nil
	})
}
// WhitelistReadableFields will enforce the authorization by making sure only the
// specified fields are returned for the client.
//
// Note: This enforcer cannot be used to authorize Delete, ResourceAction and
// CollectionAction operations.