Sha256: 34cd48eda546078d9d129e245ad2e5fa308a6e9cf0cfeb3b7df8118a8e06a8b1

Contents?: true

Size: 440 Bytes

Versions: 13

Compression:

Stored size: 440 Bytes

Contents

class Role
  include DataMapper::Resource

  property :id,     Serial
  property :name,   String
  
  has n, :servers
  has n, :grants
  has n, :users, :through => :grants
  
  belongs_to :map, :required => false
  
  def narrate_as
    "role - #{self.name}"
  end
    
  def update_user_access!
    narrate "Updating role"
    self.servers.each do |server|
      server.install_accounts!
      server.remove_dead_accounts
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fabric-0.4.4 lib/fabric/role.rb
fabric-0.4.3 lib/fabric/role.rb
fabric-0.4.2 lib/fabric/role.rb
fabric-0.4.1 lib/fabric/role.rb
fabric-0.4.0 lib/fabric/role.rb
fabric-0.3.6 lib/fabric/role.rb
fabric-0.3.5 lib/fabric/role.rb
fabric-0.3.4 lib/fabric/role.rb
fabric-0.3.3 lib/fabric/role.rb
fabric-0.3.2 lib/fabric/role.rb
fabric-0.3.1 lib/fabric/role.rb
fabric-0.3.0 lib/fabric/role.rb
fabric-0.2.0 lib/fabric/role.rb