enterprise/requests: fix API schema for grant requests (#25111)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2026-08-14 18:45:39 +01:00
committed by GitHub
parent 5b70bc51ba
commit a7e95e07b5
3 changed files with 6 additions and 4 deletions

View File

@@ -94,8 +94,8 @@ def _binding_default(field_name: str) -> timedelta:
class GrantRequestSerializer(EnterpriseRequiredMixin, ModelSerializer):
created_by = PartialUserSerializer(read_only=True)
revoked_by = PartialUserSerializer(read_only=True)
agent_owner = PartialUserSerializer(read_only=True)
revoked_by = PartialUserSerializer(read_only=True, allow_null=True)
agent_owner = PartialUserSerializer(read_only=True, allow_null=True)
is_active = BooleanField(read_only=True)
target_objs = SerializerMethodField()

View File

@@ -55,13 +55,13 @@ export interface GrantRequest {
* @type {PartialUser}
* @memberof GrantRequest
*/
readonly revokedBy: PartialUser;
readonly revokedBy: PartialUser | null;
/**
*
* @type {PartialUser}
* @memberof GrantRequest
*/
readonly agentOwner: PartialUser;
readonly agentOwner: PartialUser | null;
/**
*
* @type {boolean}

View File

@@ -42366,10 +42366,12 @@ components:
allOf:
- $ref: '#/components/schemas/PartialUser'
readOnly: true
nullable: true
agent_owner:
allOf:
- $ref: '#/components/schemas/PartialUser'
readOnly: true
nullable: true
is_active:
type: boolean
readOnly: true