Sha256: b3d9361cf9c119d79833082d77d856f92d7e2f7cf4156c600bd76d662c67847c

Contents?: true

Size: 543 Bytes

Versions: 36

Compression:

Stored size: 543 Bytes

Contents

require "cf/cli/user/base"

module CF::User
  class Users < Base
    desc "List all users"
    group :admin
    def users
      users =
        with_progress("Getting users") do
          client.users(:depth => 0)
        end

      spaced(users) do |u|
        display_user(u)
      end
    end

    private

    def display_user(u)
      if quiet?
        puts u.email
      else
        line "#{c(u.email, :name)}:"

        indented do
          line "admin?: #{c(u.admin?, u.admin? ? :yes : :no)}"
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
cf-5.4.7 lib/cf/cli/user/users.rb
cf-5.4.7.rc1 lib/cf/cli/user/users.rb
cf-5.4.5 lib/cf/cli/user/users.rb
cf-5.4.4 lib/cf/cli/user/users.rb
trucker-cli-0.0.3 lib/cf/cli/user/users.rb
cf-5.4.3 lib/cf/cli/user/users.rb
cf-5.4.2 lib/cf/cli/user/users.rb
trucker-cli-0.0.2 lib/cf/cli/user/users.rb
trucker-cli-0.0.1 lib/cf/cli/user/users.rb
cf-5.4.1 lib/cf/cli/user/users.rb
cf-5.4.1.rc1 lib/cf/cli/user/users.rb
cf-5.4.0 lib/cf/cli/user/users.rb
cf-5.3.1 lib/cf/cli/user/users.rb
cf-5.3.0 lib/cf/cli/user/users.rb
cf-5.2.2 lib/cf/cli/user/users.rb
cf-5.2.1.rc15 lib/cf/cli/user/users.rb
cf-5.2.1.rc14 lib/cf/cli/user/users.rb
cf-5.2.1.rc13 lib/cf/cli/user/users.rb
cf-5.2.1.rc12 lib/cf/cli/user/users.rb
cf-5.2.1.rc11 lib/cf/cli/user/users.rb