Sha256: 185848de7c1c7851105a5ea4a3996d2d258b2c296f8c5bbed2dbeab8e0808921

Contents?: true

Size: 548 Bytes

Versions: 50

Compression:

Stored size: 548 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    # This type represents the current user session.
    class SessionType < Decidim::Api::Types::BaseObject
      description "The current session"

      field :user, UserType, "The current user", null: true

      def user
        object
      end

      field :verified_user_groups, [UserGroupType], "The current user verified user groups", null: false

      def verified_user_groups
        Decidim::UserGroups::ManageableUserGroups.for(object).verified
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
decidim-core-0.29.1 lib/decidim/api/types/session_type.rb
decidim-core-0.28.4 lib/decidim/api/types/session_type.rb
decidim-core-0.27.9 lib/decidim/api/types/session_type.rb
decidim-core-0.29.0 lib/decidim/api/types/session_type.rb
decidim-core-0.28.3 lib/decidim/api/types/session_type.rb
decidim-core-0.27.8 lib/decidim/api/types/session_type.rb
decidim-core-0.29.0.rc4 lib/decidim/api/types/session_type.rb
decidim-core-0.29.0.rc3 lib/decidim/api/types/session_type.rb
decidim-core-0.29.0.rc2 lib/decidim/api/types/session_type.rb
decidim-core-0.29.0.rc1 lib/decidim/api/types/session_type.rb
decidim-core-0.28.2 lib/decidim/api/types/session_type.rb
decidim-core-0.27.7 lib/decidim/api/types/session_type.rb
decidim-core-0.28.1 lib/decidim/api/types/session_type.rb
decidim-core-0.27.6 lib/decidim/api/types/session_type.rb
decidim-core-0.26.10 lib/decidim/api/types/session_type.rb
decidim-core-0.26.9 lib/decidim/api/types/session_type.rb
decidim-core-0.28.0 lib/decidim/api/types/session_type.rb
decidim-core-0.27.5 lib/decidim/api/types/session_type.rb
decidim-core-0.28.0.rc5 lib/decidim/api/types/session_type.rb
decidim-core-0.28.0.rc4 lib/decidim/api/types/session_type.rb