mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 23:37:23 +00:00
feat: correct create projectgrant usergrant (#389)
* feat: correct create projectgrant usergrant * fix: remove orgid in frontend
This commit is contained in:
parent
c621fdee41
commit
5e42ff2bb8
@ -259,7 +259,6 @@ export class MgmtUserService {
|
|||||||
roleNamesList: string[],
|
roleNamesList: string[],
|
||||||
): Promise<UserGrant> {
|
): Promise<UserGrant> {
|
||||||
const req = new ProjectGrantUserGrantCreate();
|
const req = new ProjectGrantUserGrantCreate();
|
||||||
req.setOrgId(orgId);
|
|
||||||
req.setProjectId(projectId);
|
req.setProjectId(projectId);
|
||||||
req.setProjectGrantId(grantId);
|
req.setProjectGrantId(grantId);
|
||||||
req.setUserId(userId);
|
req.setUserId(userId);
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -3570,7 +3570,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "A successful response.",
|
"description": "A successful response.",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"$ref": "#/definitions/protobufStruct"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3581,6 +3581,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"protobufListValue": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"values": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/protobufValue"
|
||||||
|
},
|
||||||
|
"description": "Repeated field of dynamically typed values."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||||
|
},
|
||||||
"protobufNullValue": {
|
"protobufNullValue": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
@ -3589,6 +3602,51 @@
|
|||||||
"default": "NULL_VALUE",
|
"default": "NULL_VALUE",
|
||||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||||
},
|
},
|
||||||
|
"protobufStruct": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"fields": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"$ref": "#/definitions/protobufValue"
|
||||||
|
},
|
||||||
|
"description": "Unordered map of dynamically typed values."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||||
|
},
|
||||||
|
"protobufValue": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"null_value": {
|
||||||
|
"$ref": "#/definitions/protobufNullValue",
|
||||||
|
"description": "Represents a null value."
|
||||||
|
},
|
||||||
|
"number_value": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double",
|
||||||
|
"description": "Represents a double value."
|
||||||
|
},
|
||||||
|
"string_value": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Represents a string value."
|
||||||
|
},
|
||||||
|
"bool_value": {
|
||||||
|
"type": "boolean",
|
||||||
|
"format": "boolean",
|
||||||
|
"description": "Represents a boolean value."
|
||||||
|
},
|
||||||
|
"struct_value": {
|
||||||
|
"$ref": "#/definitions/protobufStruct",
|
||||||
|
"description": "Represents a structured value."
|
||||||
|
},
|
||||||
|
"list_value": {
|
||||||
|
"$ref": "#/definitions/protobufListValue",
|
||||||
|
"description": "Represents a repeated `Value`."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||||
|
},
|
||||||
"v1AddOrgDomainRequest": {
|
"v1AddOrgDomainRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -3791,7 +3849,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"type": "object"
|
"$ref": "#/definitions/protobufStruct"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -5168,9 +5226,6 @@
|
|||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"org_id": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"project_grant_id": {
|
"project_grant_id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
@ -148,7 +148,7 @@ func (s *Server) ProjectGrantUserGrantByID(ctx context.Context, request *Project
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) CreateProjectGrantUserGrant(ctx context.Context, in *ProjectGrantUserGrantCreate) (*UserGrant, error) {
|
func (s *Server) CreateProjectGrantUserGrant(ctx context.Context, in *ProjectGrantUserGrantCreate) (*UserGrant, error) {
|
||||||
user, err := s.usergrant.ChangeUserGrant(ctx, projectGrantUserGrantCreateToModel(in))
|
user, err := s.usergrant.AddUserGrant(ctx, projectGrantUserGrantCreateToModel(in))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -2528,10 +2528,9 @@ message ProjectGrantUserGrantID {
|
|||||||
|
|
||||||
message ProjectGrantUserGrantCreate {
|
message ProjectGrantUserGrantCreate {
|
||||||
string user_id = 1;
|
string user_id = 1;
|
||||||
string org_id = 2;
|
string project_grant_id = 2;
|
||||||
string project_grant_id = 3;
|
string project_id = 3 [(validate.rules).string.min_len = 1];
|
||||||
string project_id = 4 [(validate.rules).string.min_len = 1];
|
repeated string role_keys = 4;
|
||||||
repeated string role_keys = 5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message ProjectGrantUserGrantUpdate {
|
message ProjectGrantUserGrantUpdate {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user