mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-07 04:52:03 +00:00
feat: project view (#90)
* init for views (spooler, handler) * init for views (spooler, handler) * start view in management * granted project * implement granted project view * search granted projects * fix search column * update all projects on project change * search roles * filter org * project members * project grant members * fix tests * application view * project grant search * mock * test appendevents * test appendevents * Update internal/view/query.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/eventstore/spooler/spooler.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/view/query.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * merge request changes * Update internal/project/repository/view/model/application.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * merge request changes * Project view sql (#92) * sql and configs * error handling * sql start in eventstore * on error handling, config * read user on members * Update internal/project/repository/view/application_view.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/application.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/application.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/application.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/application.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/application.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/application_query.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_grant_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_grant_member_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_grant_member_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_member_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_member_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/granted_project.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * return caos errors * Update internal/project/repository/view/model/granted_project_query.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/project_grant_member.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/project_grant_member_query.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/project_member.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/project_member_query.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/project_role.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update internal/project/repository/view/model/project_role_query.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/application_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/application_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update pkg/management/api/grpc/project_converter.go Co-authored-by: Silvan <silvan.reusser@gmail.com> * converter fix Co-authored-by: Livio Amstutz <livio.a@gmail.com> Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
@@ -132,7 +132,34 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/grants/{id}": {
|
||||
"/grantedprojects/_search": {
|
||||
"post": {
|
||||
"summary": "PROJECTS",
|
||||
"operationId": "SearchGrantedProjects",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1GrantedProjectSearchResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1GrantedProjectSearchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"ManagementService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/grantedprojects/{project_id}/grants/{id}": {
|
||||
"get": {
|
||||
"summary": "GRANTED_PROJECT_GRANTS",
|
||||
"operationId": "GetGrantedProjectGrantByID",
|
||||
@@ -145,6 +172,12 @@
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "project_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
@@ -996,33 +1029,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/projects/_search": {
|
||||
"post": {
|
||||
"summary": "PROJECTS",
|
||||
"operationId": "SearchProjects",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1ProjectSearchResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1ProjectSearchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"ManagementService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/projects/grants/members/roles": {
|
||||
"get": {
|
||||
"summary": "PROJECT_GRANT_MEMBER",
|
||||
@@ -3538,7 +3544,7 @@
|
||||
"result": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1Application"
|
||||
"$ref": "#/definitions/v1ApplicationView"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3557,6 +3563,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ApplicationView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"$ref": "#/definitions/v1AppState"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"oidc_config": {
|
||||
"$ref": "#/definitions/v1OIDCConfig"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1AuthGrant": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3784,6 +3819,114 @@
|
||||
],
|
||||
"default": "GENDER_UNSPECIFIED"
|
||||
},
|
||||
"v1GrantedProject": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"$ref": "#/definitions/v1ProjectState"
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/definitions/v1ProjectType"
|
||||
},
|
||||
"resource_owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"org_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"org_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"org_domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"grant_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1GrantedProjectSearchKey": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PROJECTSEARCHKEY_UNSPECIFIED",
|
||||
"PROJECTSEARCHKEY_PROJECT_NAME"
|
||||
],
|
||||
"default": "PROJECTSEARCHKEY_UNSPECIFIED"
|
||||
},
|
||||
"v1GrantedProjectSearchQuery": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"$ref": "#/definitions/v1GrantedProjectSearchKey"
|
||||
},
|
||||
"method": {
|
||||
"$ref": "#/definitions/v1SearchMethod"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1GrantedProjectSearchRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1GrantedProjectSearchQuery"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1GrantedProjectSearchResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"total_result": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"result": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1GrantedProject"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1MFAState": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -4441,24 +4584,6 @@
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/definitions/v1ProjectType"
|
||||
},
|
||||
"resource_owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"org_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"org_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"org_domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"grant_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
@@ -4485,12 +4610,6 @@
|
||||
"granted_org_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"granted_org_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"granted_org_domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"role_keys": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -4508,9 +4627,6 @@
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"project_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
@@ -4551,18 +4667,6 @@
|
||||
"user_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -4641,7 +4745,8 @@
|
||||
"PROJECTGRANTMEMBERSEARCHKEY_FIRST_NAME",
|
||||
"PROJECTGRANTMEMBERSEARCHKEY_LAST_NAME",
|
||||
"PROJECTGRANTMEMBERSEARCHKEY_EMAIL",
|
||||
"PROJECTGRANTMEMBERSEARCHKEY_USER_ID"
|
||||
"PROJECTGRANTMEMBERSEARCHKEY_USER_ID",
|
||||
"PROJECTGRANTMEMBERSEARCHKEY_USER_NAME"
|
||||
],
|
||||
"default": "PROJECTGRANTMEMBERSEARCHKEY_UNSPECIFIED"
|
||||
},
|
||||
@@ -4702,11 +4807,49 @@
|
||||
"result": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1ProjectGrantMember"
|
||||
"$ref": "#/definitions/v1ProjectGrantMemberView"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectGrantMemberView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"user_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectGrantSearchRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -4741,7 +4884,7 @@
|
||||
"result": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1ProjectGrant"
|
||||
"$ref": "#/definitions/v1ProjectGrantView"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4851,6 +4994,50 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectGrantView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"project_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"granted_org_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"granted_org_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"granted_org_domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"role_keys": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"state": {
|
||||
"$ref": "#/definitions/v1ProjectGrantState"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"project_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectID": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -4865,18 +5052,6 @@
|
||||
"user_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -4949,7 +5124,8 @@
|
||||
"PROJECTMEMBERSEARCHKEY_FIRST_NAME",
|
||||
"PROJECTMEMBERSEARCHKEY_LAST_NAME",
|
||||
"PROJECTMEMBERSEARCHKEY_EMAIL",
|
||||
"PROJECTMEMBERSEARCHKEY_USER_ID"
|
||||
"PROJECTMEMBERSEARCHKEY_USER_ID",
|
||||
"PROJECTMEMBERSEARCHKEY_USER_NAME"
|
||||
],
|
||||
"default": "PROJECTMEMBERSEARCHKEY_UNSPECIFIED"
|
||||
},
|
||||
@@ -5007,11 +5183,49 @@
|
||||
"result": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1ProjectMember"
|
||||
"$ref": "#/definitions/v1ProjectMemberView"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectMemberView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"user_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectRole": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5138,72 +5352,33 @@
|
||||
"result": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1ProjectRole"
|
||||
"$ref": "#/definitions/v1ProjectRoleView"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectSearchKey": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PROJECTSEARCHKEY_UNSPECIFIED",
|
||||
"PROJECTSEARCHKEY_PROJECT_NAME"
|
||||
],
|
||||
"default": "PROJECTSEARCHKEY_UNSPECIFIED"
|
||||
},
|
||||
"v1ProjectSearchQuery": {
|
||||
"v1ProjectRoleView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"$ref": "#/definitions/v1ProjectSearchKey"
|
||||
},
|
||||
"method": {
|
||||
"$ref": "#/definitions/v1SearchMethod"
|
||||
},
|
||||
"value": {
|
||||
"project_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectSearchRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1ProjectSearchQuery"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ProjectSearchResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"total_result": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"result": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1Project"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -5219,11 +5394,11 @@
|
||||
"v1ProjectType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PROJECTTYPE_UNKNOWN",
|
||||
"PROJECTTYPE_SELF",
|
||||
"PROJECTTYPE_UNSPECIFIED",
|
||||
"PROJECTTYPE_OWNED",
|
||||
"PROJECTTYPE_GRANTED"
|
||||
],
|
||||
"default": "PROJECTTYPE_UNKNOWN"
|
||||
"default": "PROJECTTYPE_UNSPECIFIED"
|
||||
},
|
||||
"v1ProjectUpdateRequest": {
|
||||
"type": "object",
|
||||
@@ -5297,7 +5472,10 @@
|
||||
"enum": [
|
||||
"SEARCHMETHOD_EQUALS",
|
||||
"SEARCHMETHOD_STARTS_WITH",
|
||||
"SEARCHMETHOD_CONTAINS"
|
||||
"SEARCHMETHOD_CONTAINS",
|
||||
"SEARCHMETHOD_EQUALS_IGNORE_CASE",
|
||||
"SEARCHMETHOD_STARTS_WITH_IGNORE_CASE",
|
||||
"SEARCHMETHOD_CONTAINS_IGNORE_CASE"
|
||||
],
|
||||
"default": "SEARCHMETHOD_EQUALS"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user