Skip to content

Instantly share code, notes, and snippets.

@xuorig
Created June 10, 2017 02:16
Show Gist options
  • Save xuorig/bac0807e506c486979450bf2c926be90 to your computer and use it in GitHub Desktop.
Save xuorig/bac0807e506c486979450bf2c926be90 to your computer and use it in GitHub Desktop.
class ExceptFilter
def self.call(schema_member, context)
if schema_member.name == "someField"
return context[:some_beta_feature]
end
if schema_member.name == "bankAccount"
return context[:current_user].hasAccessToBankAccount?
end
# ... you get the point :D
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment