Split employee document policy from core document actions

Introduce dedicated employee-scoped IAM actions and update all
resolvers and frontend mutations accordingly.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-04-01 11:33:40 +02:00
parent bcfc693366
commit 1b811011eb
12 changed files with 1331 additions and 177 deletions

View File

@@ -23,47 +23,10 @@ import (
"go.probo.inc/probo/e2e/internal/testutil"
)
// getOwnerProfileID queries the organization profiles and returns the first one (the owner's).
func getOwnerProfileID(t *testing.T, owner *testutil.Client) string {
t.Helper()
query := `
query GetProfiles($orgId: ID!) {
node(id: $orgId) {
... on Organization {
profiles(first: 1) {
edges {
node {
id
}
}
}
}
}
}
`
var result struct {
Node struct {
Profiles struct {
Edges []struct {
Node struct {
ID string `json:"id"`
} `json:"node"`
} `json:"edges"`
} `json:"profiles"`
} `json:"node"`
}
err := owner.Execute(
query,
map[string]any{"orgId": owner.GetOrganizationID().String()},
&result,
)
require.NoError(t, err)
require.NotEmpty(t, result.Node.Profiles.Edges)
return result.Node.Profiles.Edges[0].Node.ID
return owner.GetProfileID().String()
}
// createTestDocument creates a document and returns its ID and the document version ID

File diff suppressed because it is too large Load Diff