lib/fabric/server.rb in fabric-0.3.4 vs lib/fabric/server.rb in fabric-0.3.5
- old
+ new
@@ -57,10 +57,14 @@
return [] unless self.role
@accounts ||= self.role.users.collect { |user| Account.create(:user => user, :server => self) }
end
def should_account_exist_for?(user)
- self.accounts.include?(user)
+ self.accounts.each do |account|
+ return true if account.user == user
+ end
+
+ false
end
def account_exists_for?(user)
self.execute_command("id #{user.name}")
if self.output =~ /uid=/
\ No newline at end of file