MCPcopy
hub / github.com/harness/harness / getSpaceCheckAuth

Method getSpaceCheckAuth

app/api/controller/space/controller.go:162–169  ·  view source on GitHub ↗

getSpaceCheckAuth checks whether the user has the requested permission on the provided space and returns the space.

(
	ctx context.Context,
	session *auth.Session,
	spaceRef string,
	permission enum.Permission,
)

Source from the content-addressed store, hash-verified

160
161// getSpaceCheckAuth checks whether the user has the requested permission on the provided space and returns the space.
162func (c *Controller) getSpaceCheckAuth(
163 ctx context.Context,
164 session *auth.Session,
165 spaceRef string,
166 permission enum.Permission,
167) (*types.SpaceCore, error) {
168 return GetSpaceCheckAuth(ctx, c.spaceFinder, c.authorizer, session, spaceRef, permission)
169}
170
171func (c *Controller) getSpaceCheckAuthRepoCreation(
172 ctx context.Context,

Callers 15

MembershipUpdateMethod · 0.95
FindMethod · 0.95
ListPipelinesMethod · 0.95
ExportMethod · 0.95
RuleDeleteMethod · 0.95
RuleFindMethod · 0.95
MembershipAddMethod · 0.95
FindLabelMethod · 0.95
GetUsageMetricsMethod · 0.95
RuleCreateMethod · 0.95
UpdateMethod · 0.95
RuleListMethod · 0.95

Calls 1

GetSpaceCheckAuthFunction · 0.85

Tested by

no test coverage detected