Add permission definitions to route handlers
This update introduces explicit permission definitions for various route handlers across multiple routes. These changes enhance clarity and allow for more granular control over route access based on defined permissions. The updates ensure better manageability and scalability of endpoint permissions.
This commit is contained in:
@@ -47,7 +47,11 @@ class customerAttributes
|
||||
// Return an error
|
||||
$response->error('Invalid session', 400);
|
||||
}
|
||||
});
|
||||
},
|
||||
[
|
||||
'list_customer_attributes' => 'List all customer attributes'
|
||||
]
|
||||
);
|
||||
|
||||
$this->post('/customer/attributes', function () {
|
||||
// Require the user to be logged in
|
||||
@@ -78,7 +82,11 @@ class customerAttributes
|
||||
// Return an error
|
||||
$response->error('Invalid session', 400);
|
||||
}
|
||||
});
|
||||
},
|
||||
[
|
||||
'add_customer_attribute' => 'Add a customer attribute'
|
||||
]
|
||||
);
|
||||
|
||||
$this->delete('/customer/attributes', function () {
|
||||
// Require the user to be logged in
|
||||
@@ -113,6 +121,10 @@ class customerAttributes
|
||||
// Return an error
|
||||
$response->error('Invalid session', 400);
|
||||
}
|
||||
});
|
||||
},
|
||||
[
|
||||
'delete_customer_attribute' => 'Delete a customer attribute'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user