Restrict operations #18

Closed
jsmestad opened this Issue Jul 18, 2012 · 3 comments

5 participants

@jsmestad

What

Restrict a Her::Model to only supporting certain operations.

Why

In the case where you want to use all the features of the Her ORM, but you only have read-only access to a given object.

Proposed DSL

class Profile
   include Her::Model

   # Whitelist options
   supports :read, :create, :update, :delete

   # Blacklist actions
   restricts :update, :delete
end

I like the idea of whitelisting with an :all over blacklisting, thoughts?

@remiprev remiprev closed this Dec 3, 2012
@chewi

I was thinking the same thing. Why was this closed?

@mustela

👍 to have this feature

@giedriusr

Nice idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment