Sha256: 7efd7b86fbb38d2461021aebd3c3364362ba638aeb2ad9a2d5b0453d95119ad6

Contents?: true

Size: 439 Bytes

Versions: 8

Compression:

Stored size: 439 Bytes

Contents

module DataCatalog

  class Users < Base
    include Resource

    model User

    # == Permissions

    roles Roles
    permission :read   => :basic
    permission :modify => :owner

    # == Properties
  
    property :name,       :r => :basic
    property :email,      :r => :owner
    property :role,       :r => :owner, :w => :admin
    property :_api_key,   :r => :owner, :w => :admin

    # == Callbacks
  end
  
  Users.build

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sinatra_resource-0.2.6 examples/datacatalog/resources/users.rb
sinatra_resource-0.2.5 examples/datacatalog/resources/users.rb
sinatra_resource-0.2.4 examples/datacatalog/resources/users.rb
sinatra_resource-0.2.3 examples/datacatalog/resources/users.rb
sinatra_resource-0.2.2 examples/datacatalog/resources/users.rb
sinatra_resource-0.2.1 examples/datacatalog/resources/users.rb
sinatra_resource-0.2.0 examples/datacatalog/resources/users.rb
sinatra_resource-0.1.0 examples/datacatalog/resources/users.rb