Skip to content

Commit

Permalink
Rename UserIdentity to ClientIdentity
Browse files Browse the repository at this point in the history
  • Loading branch information
islamaliev committed Oct 25, 2024
1 parent e4fc548 commit 7fc8e3d
Show file tree
Hide file tree
Showing 78 changed files with 628 additions and 628 deletions.
4 changes: 2 additions & 2 deletions tests/integration/acp/add_policy/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_BasicYAML_ValidPolicyID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestACP_AddPolicy_BasicJSON_ValidPolicyID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
{
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/acp/add_policy/with_empty_args_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_EmptyPolicyData_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: "",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_ExtraPermissionsAndExtraRelations_ValidPolicyID(t *testin

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/acp/add_policy/with_extra_perms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_ExtraPermissions_ValidPolicyID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down Expand Up @@ -63,7 +63,7 @@ func TestACP_AddPolicy_ExtraDuplicatePermissions_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/acp/add_policy/with_extra_relations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_ExtraRelations_ValidPolicyID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down Expand Up @@ -67,7 +67,7 @@ func TestACP_AddPolicy_ExtraDuplicateRelations_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_NoRelations_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down Expand Up @@ -58,7 +58,7 @@ func TestACP_AddPolicy_NoRelationsLabel_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_MissingRequiredOwnerRelation_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down Expand Up @@ -61,7 +61,7 @@ func TestACP_AddPolicy_DuplicateOwnerRelation_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_OneResourceThatIsEmpty_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestACP_AddPolicy_WithRelationManagingOtherRelation_ValidPolicyID(t *testin
Description: "Test acp, where a relation is managing another relation, valid policy id",
Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down
20 changes: 10 additions & 10 deletions tests/integration/acp/add_policy/with_multi_policies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_AddMultipleDifferentPolicies_ValidPolicyIDs(t *testing.T)

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down Expand Up @@ -51,7 +51,7 @@ func TestACP_AddPolicy_AddMultipleDifferentPolicies_ValidPolicyIDs(t *testing.T)
},

testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: a policy
Expand Down Expand Up @@ -97,7 +97,7 @@ func TestACP_AddPolicy_AddMultipleDifferentPoliciesInDifferentFmts_ValidPolicyID

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
{
Expand Down Expand Up @@ -132,7 +132,7 @@ func TestACP_AddPolicy_AddMultipleDifferentPoliciesInDifferentFmts_ValidPolicyID
},

testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test2
Expand Down Expand Up @@ -199,15 +199,15 @@ func TestACP_AddPolicy_AddDuplicatePolicyByOtherCreator_ValidPolicyIDs(t *testin

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: policyUsedByBoth,

ExpectedPolicyID: "66f3e364004a181e9b129f65dea317322d2285226e926d7e8cdfd644954e4262",
},

testUtils.AddPolicy{
Identity: testUtils.UserIdentity(2),
Identity: testUtils.ClientIdentity(2),

Policy: policyUsedByBoth,

Expand All @@ -226,7 +226,7 @@ func TestACP_AddPolicy_AddMultipleDuplicatePolicies_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestACP_AddPolicy_AddMultipleDuplicatePolicies_Error(t *testing.T) {
},

testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -293,7 +293,7 @@ func TestACP_AddPolicy_AddMultipleDuplicatePoliciesDifferentFmts_ProducesDiffere

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand All @@ -320,7 +320,7 @@ func TestACP_AddPolicy_AddMultipleDuplicatePoliciesDifferentFmts_ProducesDiffere
},

testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_MultipleResources_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -78,7 +78,7 @@ func TestACP_AddPolicy_MultipleResourcesUsingRelationDefinedInOther_Error(t *tes

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestACP_AddPolicy_SecondResourcesMissingRequiredOwner_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/acp/add_policy/with_no_perms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestACP_AddPolicy_NoPermissionsOnlyOwner_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestACP_AddPolicy_NoPermissionsMultiRelations_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -104,7 +104,7 @@ func TestACP_AddPolicy_NoPermissionsLabelOnlyOwner_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -137,7 +137,7 @@ func TestACP_AddPolicy_NoPermissionsLabelMultiRelations_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/acp/add_policy/with_no_resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestACP_AddPolicy_NoResource_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -56,7 +56,7 @@ func TestACP_AddPolicy_NoResourceLabel_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -85,7 +85,7 @@ func TestACP_AddPolicy_PolicyWithOnlySpace_NameIsRequired(t *testing.T) {
}),
Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: " ",

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/acp/add_policy/with_perm_expr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_PermissionExprWithOwnerInTheEndWithMinus_ValidID(t *testi

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -65,7 +65,7 @@ func TestACP_AddPolicy_PermissionExprWithOwnerInTheEndWithMinusNoSpace_ValidID(t

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_EmptyExpressionInPermission_Error(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -64,7 +64,7 @@ func TestACP_AddPolicy_PermissionExprWithOwnerInTheEndWithInocorrectSymbol_Error

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -105,7 +105,7 @@ func TestACP_AddPolicy_PermissionExprWithOwnerInTheEndWithInocorrectSymbolNoSpac

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestACP_AddPolicy_PermissionlessOwnerWrite_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -71,7 +71,7 @@ func TestACP_AddPolicy_PermissionlessOwnerRead_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestACP_AddPolicy_PermissionlessOwnerReadWrite_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestACP_AddPolicy_UnusedRelation_ValidID(t *testing.T) {

Actions: []any{
testUtils.AddPolicy{
Identity: testUtils.UserIdentity(1),
Identity: testUtils.ClientIdentity(1),

Policy: `
name: test
Expand Down
Loading

0 comments on commit 7fc8e3d

Please sign in to comment.