Action Permissions

Action permissions are the simplest type - they only control when an action can be executed based on time.

High-Level Logic

For each action request:
    Check if current time is in permanentlyPermittedTimes
        β†’ If yes: ALLOW
        β†’ If no: Check if current time is in permanentlyForbiddenTimes
            β†’ If yes: DENY
            β†’ If no: ALLOW (neutral state)

English: "For these times, this action can be performed" or "For these times, this action is blocked"

Overview

Action Request
    ↓
Time Check
    ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Permitted Times β”‚ Forbidden Times β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    ↓
Execute Action    Deny Action

Interface

interface ActionPermission {
    permanentlyPermittedTimes: UintRange[];
    permanentlyForbiddenTimes: UintRange[];
}

Collection Actions

Action
Description
Use Case

canDeleteCollection

Delete entire collection

Permanent lock

User Actions

Action
Description
Use Case

canUpdateAutoApproveSelfInitiatedOutgoingTransfers

Auto-approve outgoing transfers

User convenience

canUpdateAutoApproveSelfInitiatedIncomingTransfers

Auto-approve incoming transfers

User convenience

canUpdateAutoApproveAllIncomingTransfers

Auto-approve all incoming

User convenience

Examples

Lock Collection Deletion Forever

{
    "canDeleteCollection": [
        {
            "permanentlyPermittedTimes": [],
            "permanentlyForbiddenTimes": [
                { "start": "1", "end": "18446744073709551615" }
            ]
        }
    ]
}

Allow Collection Deletion Only During Specific Period

{
    "canDeleteCollection": [
        {
            "permanentlyPermittedTimes": [
                { "start": "1704067200000", "end": "1735689600000" }
            ],
            "permanentlyForbiddenTimes": []
        }
    ]
}

Default Behavior (No Restrictions)

{
    "canDeleteCollection": []
}

Last updated