مدیریت کاربران از پیش ساخته شده شما
Via backoffice API, most importantly you can manage the capabilities before using the backend. Of course, you can add or remove capabilities anytime, but it's something you want to consider while building a correct backend.
curl -X GET http://localhost:46702/capabilities
{
"data": {
"items": [
{
"ID": 1,
"CreatedAt": "2021-10-10T11:37:23.823745782+02:00",
"UpdatedAt": "2021-10-10T11:37:23.823745782+02:00",
"DeletedAt": null,
"name": "owner",
"group": "root"
},
{
"ID": 2,
"CreatedAt": "2021-10-10T11:37:23.826458815+02:00",
"UpdatedAt": "2021-10-10T11:37:23.826458815+02:00",
"DeletedAt": null,
"name": "user",
"group": "root"
}
]
}
}
curl --data '{"name":"create_users","group":"user"}' -X POST http://localhost:46702/capability
{
"data": {
"item": {
"ID": 3,
"CreatedAt": "2021-10-10T12:26:15.517836491+02:00",
"UpdatedAt": "2021-10-10T12:26:15.517836491+02:00",
"DeletedAt": null,
"name": "create_users",
"group": "user"
}
}
}
If you no longer need an specific capability in the system, for example if a feature has been removed, you can use this endpoint to remove the capabilities.
curl -X DELETE http://localhost:46702/capability/create_users
{
"deleted": true
}