---
url: "https://vueda.dev/v3/reference/api/py/vueda.workflow.models/StatePermission.md"
title: "StatePermission"
---

# StatePermission

## Overview

The state of an object can grant additional or deny existing permissions at a row level.

## `DoesNotExist` {#DoesNotExist}

The requested object does not exist

### Source {#DoesNotExist-source}

`server/vueda/workflow/models.py`

## `MultipleObjectsReturned` {#MultipleObjectsReturned}

The query returned multiple objects when only one was expected.

### Source {#MultipleObjectsReturned-source}

`server/vueda/workflow/models.py`

## `NotUpdated` {#NotUpdated}

The updated object no longer exists.

### Source {#NotUpdated-source}

`server/vueda/workflow/models.py`

## `grant_or_deny` {#grant_or_deny}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#grant_or_deny-signature}

`grant_or_deny(unknown)`

#### Parameters {#grant_or_deny-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="grant_or_deny-param-unknown">unknown</span> |  | yes |  |  |

## `historical_group_name` {#historical_group_name}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#historical_group_name-signature}

`historical_group_name(unknown)`

#### Parameters {#historical_group_name-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="historical_group_name-param-unknown">unknown</span> |  | yes |  |  |

## `historical_permission_codename` {#historical_permission_codename}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#historical_permission_codename-signature}

`historical_permission_codename(unknown)`

#### Parameters {#historical_permission_codename-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="historical_permission_codename-param-unknown">unknown</span> |  | yes |  |  |

## `historical_permission_content_type_app_label` {#historical_permission_content_type_app_label}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#historical_permission_content_type_app_label-signature}

`historical_permission_content_type_app_label(unknown)`

#### Parameters {#historical_permission_content_type_app_label-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="historical_permission_content_type_app_label-param-unknown">unknown</span> |  | yes |  |  |

## `historical_permission_content_type_model_name` {#historical_permission_content_type_model_name}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#historical_permission_content_type_model_name-signature}

`historical_permission_content_type_model_name(unknown)`

#### Parameters {#historical_permission_content_type_model_name-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="historical_permission_content_type_model_name-param-unknown">unknown</span> |  | yes |  |  |

## `id` {#id}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#id-signature}

`id(unknown)`

#### Parameters {#id-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="id-param-unknown">unknown</span> |  | yes |  |  |

## `objects` {#objects}

### Signature {#objects-signature}

`objects(unknown)`

#### Parameters {#objects-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="objects-param-unknown">unknown</span> |  | yes |  |  |

## `pgh_event_model` {#pgh_event_model}

A descriptor for accessing the pgh_event_model field on a tracked model

### Signature {#pgh_event_model-signature}

`pgh_event_model(unknown)`

#### Parameters {#pgh_event_model-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="pgh_event_model-param-unknown">unknown</span> |  | yes |  |  |

## `save` {#save}

Save the current instance. Override this in a subclass if you want to
control the saving process.

The 'force_insert' and 'force_update' parameters can be used to insist
that the "save" must be an SQL insert or update (or equivalent for
non-SQL backends), respectively. Normally, they should not be set.

### Signature {#save-signature}

`save(self, kwargs)`

#### Parameters {#save-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| self |  | yes |  |  |
| <span id="save-param-kwargs">kwargs</span> |  | no |  |  |

### Source {#save-source}

`server/vueda/workflow/models.py:245`

## `events` {#events}

Accessor to the related objects manager on the reverse side of a
many-to-one relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Parent.children`` is a ``ReverseManyToOneDescriptor`` instance.

Most of the implementation is delegated to a dynamically defined manager
class built by ``create_reverse_many_to_one_manager()`` defined below.

## `group` {#group}

Accessor to the related object on the forward side of a many-to-one or
one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Child.parent`` is a ``ForwardManyToOneDescriptor`` instance.

## `group_id` {#group_id}

## `permission` {#permission}

Accessor to the related object on the forward side of a many-to-one or
one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Child.parent`` is a ``ForwardManyToOneDescriptor`` instance.

## `permission_id` {#permission_id}

## `pgh_event_models` {#pgh_event_models}

## `state` {#state}

Accessor to the related object on the forward side of a many-to-one or
one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Child.parent`` is a ``ForwardManyToOneDescriptor`` instance.

## `state_id` {#state_id}

## Source

`server/vueda/workflow/models.py:189`
