// Show runs the show action.
3318
func (c *FeaturesController) Show(ctx *app.ShowFeaturesContext) error {
	return proxy.RouteHTTP(ctx, c.config.GetTogglesServiceURL())
}
919356
func (c *UserServiceController) Show(ctx *app.ShowUserServiceContext) error {
	t, err := c.ShowTenant(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}

	return ctx.OK(convert(t))
}
1358093
func PageShow(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "pageshow", Listener: listener}
}
812335
func (c *SpaceController) Show(ctx *app.ShowSpaceContext) error {
	var s *space.Space
	err := application.Transactional(c.db, func(appl application.Application) error {
		var err error
		s, err = appl.Spaces().Load(ctx.Context, ctx.SpaceID)
		if err != nil {
			log.Error(ctx, map[string]interface{}{
				"err":      err,
				"space_id": ctx.SpaceID,
			}, "unable to load the space by ID")
		}
		return err
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.ConditionalRequest(*s, c.config.GetCacheControlSpace, func() error {
		spaceData, err := ConvertSpaceFromModel(ctx.Request, *s, IncludeBacklogTotalCount(ctx.Context, c.db))
		if err != nil {
			log.Error(ctx, map[string]interface{}{
				"err":      err,
				"space_id": ctx.SpaceID,
			}, "unable to convert the space object")
			return err
		}
		result := &app.SpaceSingle{
			Data: spaceData,
		}
		return ctx.OK(result)
	})
}
829803
func (c *showCommand) Run(ctx *cmd.Context) (err error) {
	controllerName, err := c.ControllerName()
	if err != nil {
		return err
	}
	url, err := crossmodel.ParseOfferURL(c.url)
	if err != nil {
		store := c.ClientStore()
		currentModel, err := store.CurrentModel(controllerName)
		if err != nil {
			return errors.Trace(err)
		}
		url, err = makeURLFromCurrentModel(c.url, controllerName, currentModel)
		if err != nil {
			return errors.Trace(err)
		}
	}
	if url.Source != "" {
		controllerName = url.Source
	}
	accountDetails, err := c.CurrentAccountDetails()
	if err != nil {
		return err
	}
	loggedInUser := accountDetails.User

	api, err := c.newAPIFunc(controllerName)
	if err != nil {
		return err
	}
	defer api.Close()

	url.Source = ""
	found, err := api.ApplicationOffer(url.String())
	if err != nil {
		return err
	}

	output, err := convertOffers(controllerName, names.NewUserTag(loggedInUser), found)
	if err != nil {
		return err
	}
	return c.out.Write(ctx, output)
}
368524
func (surface *Surface) ShowPage() {
	C.cairo_surface_show_page(surface.Ptr)
	if err := surface.status(); err != nil {
		panic(err)
	}
}
1265694
func (s *Action) show(ctx context.Context, c *cli.Context, name, key string, recurse bool) error {
	if name == "" {
		return ExitError(ctx, ExitUsage, nil, "Usage: %s show [name]", s.Name)
	}

	if s.Store.IsDir(ctx, name) && !s.Store.Exists(ctx, name) {
		return s.List(ctx, c)
	}
	if s.Store.IsDir(ctx, name) && ctxutil.IsTerminal(ctx) {
		out.Cyan(ctx, "Warning: %s is a secret and a folder. Use 'gopass show %s' to display the secret and 'gopass list %s' to show the content of the folder", name, name, name)
	}

	// auto-fallback to binary files with b64 suffix, if unique
	if !s.Store.Exists(ctx, name) && s.Store.Exists(ctx, name+BinarySuffix) {
		name += BinarySuffix
	}

	if HasRevision(ctx) {
		return s.showHandleRevision(ctx, c, name, key, GetRevision(ctx))
	}

	sec, ctx, err := s.Store.GetContext(ctx, name)
	if err != nil {
		return s.showHandleError(ctx, c, name, recurse, err)
	}

	return s.showHandleOutput(ctx, name, key, sec)
}
186245
func Show(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "show", Listener: listener}
}
402386
func Display(d, xauthPath string) ServiceOption {
	return func(s *Service) error {
		if s.display != "" {
			return fmt.Errorf("service display already set: %v", s.display)
		}
		if s.xauthPath != "" {
			return fmt.Errorf("service xauth path already set: %v", s.xauthPath)
		}
		if !isDisplay(d) {
			return fmt.Errorf("supplied display %q must be of the format 'x' or 'x.y' where x and y are integers", d)
		}
		s.display = d
		s.xauthPath = xauthPath
		return nil
	}
}
1053958
func (c *WorkitemController) Show(ctx *app.ShowWorkitemContext) error {
	var wi *workitem.WorkItem
	var wit *workitem.WorkItemType
	err := application.Transactional(c.db, func(appl application.Application) error {
		var err error
		wi, err = appl.WorkItems().LoadByID(ctx, ctx.WiID)
		if err != nil {
			return errs.Wrap(err, fmt.Sprintf("Fail to load work item with id %v", ctx.WiID))
		}
		wit, err = appl.WorkItemTypes().Load(ctx.Context, wi.Type)
		if err != nil {
			return errs.Wrapf(err, "failed to load work item type: %s", wi.Type)
		}
		return nil
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.ConditionalRequest(*wi, c.config.GetCacheControlWorkItem, func() error {
		comments := workItemIncludeCommentsAndTotal(ctx, c.db, ctx.WiID)
		hasChildren := workItemIncludeHasChildren(ctx, c.db)
		wi2, err := ConvertWorkItem(ctx.Request, *wit, *wi, comments, hasChildren)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		resp := &app.WorkItemSingle{
			Data: wi2,
		}
		return ctx.OK(resp)
	})
}
327028
func (s *orgManager) Show() (result *PivotOrg, err error) {
	result = new(PivotOrg)
	userInfo := GetUserInfo(s.tokens)
	NewUserMatch().UserInfo(userInfo).UserName(s.username).OnSuccess(func() {
		s.log.Println("getting userInfo: ", userInfo)
		s.log.Println("result value: ", result)
		err = s.store.FindOne(bson.M{EmailFieldName: s.username}, result)
		s.log.Println("response: ", result, err)
	}).OnFailure(func() {
		s.log.Println(ErrCantCallAcrossUsers.Error())
		err = ErrCantCallAcrossUsers
	}).Run()
	return
}
1239089
func (c *OpenidConfigurationController) Show(ctx *app.ShowOpenidConfigurationContext) error {

	issuer := rest.AbsoluteURL(ctx.RequestData, "", nil)
	authorizationEndpoint := rest.AbsoluteURL(ctx.RequestData, client.AuthorizeAuthorizePath(), nil)
	tokenEndpoint := rest.AbsoluteURL(ctx.RequestData, client.ExchangeTokenPath(), nil)
	userinfoEndpoint := rest.AbsoluteURL(ctx.RequestData, client.ShowUserinfoPath(), nil)
	logoutEndpoint := rest.AbsoluteURL(ctx.RequestData, client.LogoutLogoutPath(), nil)
	jwksURI := rest.AbsoluteURL(ctx.RequestData, client.KeysTokenPath(), nil)

	authOpenIDConfiguration := &app.OpenIDConfiguration{
		// REQUIRED properties
		Issuer:                 &issuer,
		AuthorizationEndpoint:  &authorizationEndpoint,
		TokenEndpoint:          &tokenEndpoint,
		EndSessionEndpoint:     &logoutEndpoint,
		ResponseTypesSupported: []string{"code"},
		JwksURI:                &jwksURI,

		// subject_types_supported REQUIRED. JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.
		// A Subject Identifier is a locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client.
		// http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
		// subject ==  identity
		SubjectTypesSupported: []string{"public"},
		// id_token_signing_alg_values_supported REQUIRED. JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].
		// The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow).
		IDTokenSigningAlgValuesSupported: []string{"RS256"},

		// RECOMMENDED properties
		UserinfoEndpoint: &userinfoEndpoint,
		ScopesSupported:  []string{"openid", "offline_access"},
		ClaimsSupported:  []string{"sub", "iss", "auth_time", "name", "given_name", "family_name", "preferred_username", "email"},

		// OPTIONAL properties
		GrantTypesSupported: []string{"authorization_code", "refresh_token", "client_credentials"},
		// client_secret_post for client_credentials grant_type
		// client_secre_jwt for authorizatoin_code grant_type
		TokenEndpointAuthMethodsSupported: []string{"client_secret_post", "client_secret_jwt"},
		// response_modes_supported
	}

	return ctx.OK(authOpenIDConfiguration)
}
358858
func (u *Usage) Show() error {
	b := u.handler
	defer u.garbage.Cleanup(u.config)

	b.SetScripts([]string{constants.Usage}, []string{})

	if err := b.Prepare(u.config); err != nil {
		return err
	}

	return b.Execute(constants.Usage, "", u.config)
}
930365
func (m *Money) Display() string {
	c := m.currency.get()
	return c.Formatter().Format(m.amount.val)
}
257306
func (c *CommentsController) Show(ctx *app.ShowCommentsContext) error {
	var cmt *comment.Comment
	err := application.Transactional(c.db, func(appl application.Application) error {
		var err error
		cmt, err = appl.Comments().Load(ctx, ctx.CommentID)
		return err
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.ConditionalRequest(*cmt, c.config.GetCacheControlComment, func() error {
		res := &app.CommentSingle{}
		// This code should change if others type of parents than WI are allowed
		includeParentWorkItem := CommentIncludeParentWorkItem(ctx, cmt)
		res.Data = ConvertComment(
			ctx.Request,
			*cmt,
			includeParentWorkItem)
		return ctx.OK(res)
	})
}
120621
func (c *AreaController) Show(ctx *app.ShowAreaContext) error {
	id, err := uuid.FromString(ctx.ID)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound(err.Error()))
	}
	var a *area.Area
	err = application.Transactional(c.db, func(appl application.Application) error {
		a, err = appl.Areas().Load(ctx, id)
		return err
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.ConditionalRequest(*a, c.config.GetCacheControlArea, func() error {
		res := &app.AreaSingle{}
		res.Data = ConvertArea(c.db, ctx.Request, *a, addResolvedPath)
		return ctx.OK(res)
	})
}
497200
func (c *UsersController) Show(ctx *app.ShowUsersContext) error {
	tenantSA := token.IsSpecificServiceAccount(ctx, token.Tenant)
	isServiceAccount := tenantSA || token.IsSpecificServiceAccount(ctx, token.Notification)

	var identity *accountrepo.Identity
	err := transaction.Transactional(c.app, func(tr transaction.TransactionalResources) error {
		identityID, err := uuid.FromString(ctx.ID)
		if err != nil {
			return errors.NewBadParameterError("identity_id", ctx.ID)
		}
		identity, err = tr.Identities().LoadWithUser(ctx.Context, identityID)
		if err != nil {
			return err
		}

		if tenantSA && identity.User.Banned {
			// Don't return banned users for calls made by Tenant SA
			// TODO we should disable notifications for such users too but if we just return 401 for notification service request we may break it
			ctx.ResponseData.Header().Add("Access-Control-Expose-Headers", "WWW-Authenticate")
			ctx.ResponseData.Header().Set("WWW-Authenticate", "DEPROVISIONED description=\"Account has been banned\"")
			return errors.NewUnauthorizedError("Account has been banned")
		}

		return nil
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.ConditionalRequest(identity.User, c.config.GetCacheControlUser, func() error {
		return ctx.OK(ConvertToAppUser(ctx.RequestData, &identity.User, identity, isServiceAccount))
	})
}