mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-02 12:22:15 +00:00
chore: naming consistency - Organization ID (#11733)
# Which Problems Are Solved Renaming of: - Resource Owner - OrgID - OrganizationID - Organization Id # How the Problems Are Solved Find & Replace, evalue entries, is resource owner referring to an organization ? If so, do change # Additional Context - Closes #11305
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
// ExamplePermissionClause_org shows how to use the PermissionClause function to filter
|
||||
// permitted records based on the resource owner and the user's instance or organization membership.
|
||||
// permitted records based on the Organization ID and the user's instance or organization membership.
|
||||
func ExamplePermissionClause_org() {
|
||||
// These variables are typically set in the middleware of Zitadel.
|
||||
// They do not influence the generation of the clause, just what
|
||||
@@ -23,7 +23,7 @@ func ExamplePermissionClause_org() {
|
||||
|
||||
join, args := PermissionClause(
|
||||
ctx,
|
||||
UserResourceOwnerCol, // match the resource owner column
|
||||
UserResourceOwnerCol, // match the Organization ID column
|
||||
domain.PermissionUserRead,
|
||||
SingleOrgPermissionOption([]SearchQuery{
|
||||
mustSearchQuery(NewUserDisplayNameSearchQuery("zitadel", TextContains)),
|
||||
@@ -44,7 +44,7 @@ func ExamplePermissionClause_org() {
|
||||
}
|
||||
|
||||
// ExamplePermissionClause_project shows how to use the PermissionClause function to filter
|
||||
// permitted records based on the resource owner and the user's instance or organization membership.
|
||||
// permitted records based on the Organization ID and the user's instance or organization membership.
|
||||
// Additionally, it allows returning records based on the project ID and project membership.
|
||||
func ExamplePermissionClause_project() {
|
||||
// These variables are typically set in the middleware of Zitadel.
|
||||
@@ -57,7 +57,7 @@ func ExamplePermissionClause_project() {
|
||||
|
||||
join, args := PermissionClause(
|
||||
ctx,
|
||||
ProjectColumnResourceOwner, // match the resource owner column
|
||||
ProjectColumnResourceOwner, // match the Organization ID column
|
||||
"project.read",
|
||||
WithProjectsPermissionOption(ProjectColumnID),
|
||||
SingleOrgPermissionOption([]SearchQuery{
|
||||
|
||||
@@ -243,7 +243,7 @@ func Test_ProjectGrantPrepares(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "prepareProjectGrantsQuery no resource owner",
|
||||
name: "prepareProjectGrantsQuery no Organization ID",
|
||||
prepare: prepareProjectGrantsQuery,
|
||||
want: want{
|
||||
sqlExpectations: mockQueries(
|
||||
@@ -476,7 +476,7 @@ func Test_ProjectGrantPrepares(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "prepareProjectGrantQuery no resource owner",
|
||||
name: "prepareProjectGrantQuery no Organization ID",
|
||||
prepare: prepareProjectGrantQuery,
|
||||
want: want{
|
||||
sqlExpectations: mockQuery(
|
||||
|
||||
@@ -67,7 +67,7 @@ var (
|
||||
"user_id",
|
||||
"username",
|
||||
"type",
|
||||
"resource_owner", //user resource owner
|
||||
"resource_owner", // user Organization ID
|
||||
"name",
|
||||
"primary_domain",
|
||||
"first_name",
|
||||
@@ -76,12 +76,12 @@ var (
|
||||
"display_name",
|
||||
"avatar_key",
|
||||
"login_name",
|
||||
"resource_owner", //user_grant resource owner
|
||||
"name", //org name
|
||||
"resource_owner", // user_grant Organization ID
|
||||
"name", // org name
|
||||
"primary_domain",
|
||||
"project_id",
|
||||
"name", // project name
|
||||
"resource_owner", // project_grant resource owner
|
||||
"resource_owner", // project_grant Organization ID
|
||||
"id", // granted org id
|
||||
"name", // granted org name
|
||||
"primary_domain", // granted org domain
|
||||
|
||||
Reference in New Issue
Block a user