diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php index 99c2541d4..3df29f95a 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php @@ -10,8 +10,8 @@ class LoginProxyPasswordGrantRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'permissions' => null, - 'roles' => null, + 'permissions' => '', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php index 67cc472a2..c68ded395 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php @@ -10,8 +10,8 @@ class LogoutRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'permissions' => null, - 'roles' => null, + 'permissions' => '', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php index f8b1e5fa2..cc2581e18 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php @@ -10,8 +10,8 @@ class RefreshProxyRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'permissions' => null, - 'roles' => null, + 'permissions' => '', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authentication/UI/API/Routes/GetAuthenticatedUser.v1.private.php b/app/Containers/AppSection/Authentication/UI/API/Routes/GetAuthenticatedUser.v1.private.php index 39199916c..23244e649 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Routes/GetAuthenticatedUser.v1.private.php +++ b/app/Containers/AppSection/Authentication/UI/API/Routes/GetAuthenticatedUser.v1.private.php @@ -4,7 +4,7 @@ * @apiGroup Authentication * @apiName GetAuthenticatedUser * - * @api {GET} /v1/profile Find Logged-in User data (Profile Information) + * @api {GET} /v1/profile Get Profile * @apiDescription Find the user details of the logged-in user from its Token. (without specifying his ID) * * @apiVersion 1.0.0 diff --git a/app/Containers/AppSection/Authentication/UI/API/Routes/LoginProxyForWebClient.v1.public.php b/app/Containers/AppSection/Authentication/UI/API/Routes/LoginProxyForWebClient.v1.public.php index ef428bd01..f86d1fb10 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Routes/LoginProxyForWebClient.v1.public.php +++ b/app/Containers/AppSection/Authentication/UI/API/Routes/LoginProxyForWebClient.v1.public.php @@ -7,6 +7,7 @@ * @apiDescription Login Users using their email and password, without client_id and client_secret. * * @apiVersion 1.0.0 + * @apiPermission none * * @apiParam {String} email user email * @apiParam {String} password user password diff --git a/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingCredentialGrant.v1.public.php b/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingCredentialGrant.v1.public.php index aa8004121..bf85c1896 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingCredentialGrant.v1.public.php +++ b/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingCredentialGrant.v1.public.php @@ -8,7 +8,7 @@ * You must have client ID and secret first. You can generate them by creating new Client in our Web App. * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission none * * @apiParam {String} client_id * @apiParam {String} client_secret diff --git a/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingPasswordGrant.v1.private.php b/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingPasswordGrant.v1.private.php index 3e5ae189c..ee45d26d9 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingPasswordGrant.v1.private.php +++ b/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingPasswordGrant.v1.private.php @@ -7,7 +7,7 @@ * @apiDescription Login Users using their username and passwords. (For First-Party Clients) * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission none * * @apiParam {String} username user email * @apiParam {String} password user password diff --git a/app/Containers/AppSection/Authentication/UI/API/Routes/RefreshProxyForWebClient.v1.public.php b/app/Containers/AppSection/Authentication/UI/API/Routes/RefreshProxyForWebClient.v1.public.php index 3737416da..eadc10880 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Routes/RefreshProxyForWebClient.v1.public.php +++ b/app/Containers/AppSection/Authentication/UI/API/Routes/RefreshProxyForWebClient.v1.public.php @@ -7,6 +7,7 @@ * @apiDescription Get new tokens given a valid refresh token is provided. * * @apiVersion 1.0.0 + * @apiPermission none * * @apiParam {String} [refresh_token] The refresh Token * diff --git a/app/Containers/AppSection/Authentication/UI/API/Routes/RegisterUser.v1.private.php b/app/Containers/AppSection/Authentication/UI/API/Routes/RegisterUser.v1.private.php index 53aa44f5c..0893e673a 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Routes/RegisterUser.v1.private.php +++ b/app/Containers/AppSection/Authentication/UI/API/Routes/RegisterUser.v1.private.php @@ -14,7 +14,7 @@ * @apiParam {String} [name] min:2|max:50 * @apiParam {String="male,female,unspecified"} [gender] * @apiParam {Date} [birth] format: Y-m-d / e.g. 2015-10-15 - * @apiParam {String} verification_url requireIf:email_verification_required|url|in:allowed-verify-email-urls + * @apiParam {String} [verification_url] requireIf:email_verification_required|url|in:allowed-verify-email-urls * * @apiUse UserSuccessSingleResponse */ diff --git a/app/Containers/AppSection/Authentication/UI/API/Routes/ResetPassword.v1.public.php b/app/Containers/AppSection/Authentication/UI/API/Routes/ResetPassword.v1.public.php index 562186249..0ca7d2147 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Routes/ResetPassword.v1.public.php +++ b/app/Containers/AppSection/Authentication/UI/API/Routes/ResetPassword.v1.public.php @@ -5,7 +5,7 @@ * @apiName ResetPassword * * @api {GET/POST} /v1/password/reset Reset Password - * @apiDescription Resets a password for an user. + * @apiDescription Resets password of a user. * * @apiVersion 1.0.0 * @apiPermission none diff --git a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php index 7cd3c3b38..a480dc4a8 100644 --- a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php +++ b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php @@ -2,8 +2,6 @@ namespace App\Containers\AppSection\Authorization\Data\Seeders; -use App\Containers\AppSection\Authentication\Tasks\CreateUserByCredentialsTask; -use App\Containers\AppSection\Authorization\Tasks\AssignRolesToUserTask; use App\Containers\AppSection\User\Actions\CreateAdminAction; use App\Ship\Exceptions\CreateResourceFailedException; use App\Ship\Parents\Seeders\Seeder; @@ -13,6 +11,7 @@ class AuthorizationDefaultUsersSeeder_4 extends Seeder { /** * @throws CreateResourceFailedException + * @throws Throwable */ public function run(): void { diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php index 45294bf21..13903e77d 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php @@ -10,8 +10,8 @@ class AssignRolesToUserRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-admins-access', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php index 350adf85d..08fdc4575 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php @@ -10,8 +10,8 @@ class AttachPermissionsToRoleRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php index 53186fb9c..bd5621f1d 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php @@ -10,8 +10,8 @@ class CreateRoleRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php index 06a9fcc44..978b20bb5 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php @@ -10,8 +10,8 @@ class DeleteRoleRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php index ac191db6a..61af87520 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php @@ -10,8 +10,8 @@ class DetachPermissionsFromRoleRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php index a419adc1c..c46de64ff 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php @@ -10,8 +10,8 @@ class FindPermissionRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php index 3a45cb584..87676aa57 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php @@ -10,8 +10,8 @@ class FindRoleRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php index e5de083ea..0229d15e9 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php @@ -10,8 +10,8 @@ class GetAllPermissionsRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php index 25771522e..d2e76030b 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php @@ -10,8 +10,8 @@ class GetAllRolesRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php index 3880b2baa..24354f025 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php @@ -10,8 +10,8 @@ class RevokeRolesFromUserRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-admins-access', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php index cea75fca4..2ca825599 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php @@ -10,8 +10,8 @@ class SyncPermissionsOnRoleRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-roles', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php index 97e79a3ce..3d21553ac 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php @@ -10,8 +10,8 @@ class SyncUserRolesRequest extends Request * Define which Roles and/or Permissions has access to this request. */ protected array $access = [ - 'roles' => '', 'permissions' => 'manage-admins-access', + 'roles' => '', ]; /** diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/AssignRolesToUser.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/AssignRolesToUser.v1.private.php index 1f2e285a1..fd3d1e8d4 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/AssignRolesToUser.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/AssignRolesToUser.v1.private.php @@ -11,7 +11,7 @@ * `/roles/sync` endpoint instead. * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-admins-access', 'roles' => ''] * * @apiParam {Number} user_id User ID * @apiParam {Array} roles_ids Role ID or Array of Roles ID's diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/AttachPermissionsToRole.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/AttachPermissionsToRole.v1.private.php index ed160a547..4afe75091 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/AttachPermissionsToRole.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/AttachPermissionsToRole.v1.private.php @@ -11,7 +11,7 @@ * `/permissions/sync` endpoint instead. * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiParam {String} role_id Role ID * @apiParam {Array} permissions_ids Permission ID or Array of Permissions ID's diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/CreateRole.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/CreateRole.v1.private.php index c1ce94aef..199334a08 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/CreateRole.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/CreateRole.v1.private.php @@ -6,7 +6,7 @@ * @api {post} /v1/roles Create a Role * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiParam {String} name Unique Role Name * @apiParam {String} [description] diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/DeleteRole.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/DeleteRole.v1.private.php index 08bfcbf56..ecc84357b 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/DeleteRole.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/DeleteRole.v1.private.php @@ -7,7 +7,7 @@ * @apiDescription Delete Role by ID * * @apiVersion 1.0.0 - * @apiPermission Authenticated Role + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiSuccessExample {json} Success-Response: * HTTP/1.1 202 OK diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/DetachPermissionsFromRole.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/DetachPermissionsFromRole.v1.private.php index d66285896..76a7e7d33 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/DetachPermissionsFromRole.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/DetachPermissionsFromRole.v1.private.php @@ -5,13 +5,13 @@ * @apiName DetachPermissionFromRole * @api {post} /v1/permissions/detach Detach Permissions from Role * @apiDescription Detach existing permission from role. This endpoint does not sync the role - * It just detach the passed permissions from the role. So make sure - * to never send an non attached permission since it will cause an error. + * It just detaches the passed permissions from the role. So make sure + * to never send a non-attached permission since it will cause an error. * To sync (update) all existing permissions with the new ones use * `/permissions/sync` endpoint instead. * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiParam {String} role_id Role ID * @apiParam {String-Array} permissions_ids Permission ID or Array of Permissions ID's diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/FindPermission.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/FindPermission.v1.private.php index 12ac6e46f..beb825bb5 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/FindPermission.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/FindPermission.v1.private.php @@ -6,7 +6,7 @@ * @api {get} /v1/permissions/:id Find a Permission by ID * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiUse PermissionSuccessSingleResponse */ diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/FindRole.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/FindRole.v1.private.php index 99f727008..7948a6903 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/FindRole.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/FindRole.v1.private.php @@ -6,7 +6,7 @@ * @api {get} /v1/roles/:id Find a Role by ID * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiUse RoleSuccessSingleResponse */ diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllPermissions.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllPermissions.v1.private.php index 63d4cb8ab..498bb3996 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllPermissions.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllPermissions.v1.private.php @@ -6,7 +6,7 @@ * @api {get} /v1/permissions Get All Permission * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiUse GeneralSuccessMultipleResponse */ diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllRoles.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllRoles.v1.private.php index 89fa552dc..229eba3dc 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllRoles.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllRoles.v1.private.php @@ -6,7 +6,7 @@ * @api {get} /v1/roles Get All Roles * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiUse GeneralSuccessMultipleResponse */ diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/RevokeRolesFromUser.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/RevokeRolesFromUser.v1.private.php index 1ecf853b5..be2720c74 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/RevokeRolesFromUser.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/RevokeRolesFromUser.v1.private.php @@ -11,7 +11,7 @@ * `/roles/sync` endpoint instead. * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-admins-access', 'roles' => ''] * * @apiParam {Number} user_id user ID * @apiParam {Array} roles_ids Role ID or Array of Role ID's diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/SyncPermissionOnRole.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/SyncPermissionOnRole.v1.private.php index 6bd1fc2f7..3286b79c4 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/SyncPermissionOnRole.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/SyncPermissionOnRole.v1.private.php @@ -8,7 +8,7 @@ * The sync endpoint will override all existing role permissions with the new * one sent to this endpoint. * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-roles', 'roles' => ''] * * @apiParam {String} role_id Role ID * @apiParam {Array} permissions_ids Permission ID or Array of Permissions ID's diff --git a/app/Containers/AppSection/Authorization/UI/API/Routes/SyncUserRoles.v1.private.php b/app/Containers/AppSection/Authorization/UI/API/Routes/SyncUserRoles.v1.private.php index ea9969a52..3304f79f2 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Routes/SyncUserRoles.v1.private.php +++ b/app/Containers/AppSection/Authorization/UI/API/Routes/SyncUserRoles.v1.private.php @@ -9,7 +9,7 @@ * one sent to this endpoint. * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'manage-admins-access', 'roles' => ''] * * @apiParam {Number} user_id User ID * @apiParam {Array} roles_ids Role ID or Array of Roles ID's diff --git a/app/Containers/AppSection/User/UI/API/Routes/DeleteUser.v1.private.php b/app/Containers/AppSection/User/UI/API/Routes/DeleteUser.v1.private.php index 2e0d191b4..33daca491 100644 --- a/app/Containers/AppSection/User/UI/API/Routes/DeleteUser.v1.private.php +++ b/app/Containers/AppSection/User/UI/API/Routes/DeleteUser.v1.private.php @@ -7,13 +7,11 @@ * @apiDescription Delete users of any type (Admin, Client...) * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'delete-users', 'roles' => ''] | Resource Owner * * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 202 OK - * { - * "message": "User (4) Deleted Successfully." - * } + * HTTP/1.1 204 No Content + * {} */ use App\Containers\AppSection\User\UI\API\Controllers\DeleteUserController; diff --git a/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php b/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php index 2bcce5af4..10070f033 100644 --- a/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php +++ b/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php @@ -7,7 +7,7 @@ * @apiDescription Find a user by its ID * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'delete-users', 'roles' => ''] | Resource Owner * * @apiUse UserSuccessSingleResponse */ diff --git a/app/Containers/AppSection/User/UI/API/Routes/GetAllUsers.v1.private.php b/app/Containers/AppSection/User/UI/API/Routes/GetAllUsers.v1.private.php index b7d83a6ca..cabb9ec9b 100644 --- a/app/Containers/AppSection/User/UI/API/Routes/GetAllUsers.v1.private.php +++ b/app/Containers/AppSection/User/UI/API/Routes/GetAllUsers.v1.private.php @@ -8,7 +8,7 @@ * can use `/clients`. And for all "Admins" only you can use `/admins`. * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'list-users', 'roles' => ''] | Resource Owner * * @apiUse GeneralSuccessMultipleResponse */ diff --git a/app/Containers/AppSection/User/UI/API/Routes/UpdateUser.v1.private.php b/app/Containers/AppSection/User/UI/API/Routes/UpdateUser.v1.private.php index 6a7726f8c..4369edc47 100644 --- a/app/Containers/AppSection/User/UI/API/Routes/UpdateUser.v1.private.php +++ b/app/Containers/AppSection/User/UI/API/Routes/UpdateUser.v1.private.php @@ -6,12 +6,12 @@ * @api {patch} /v1/users/:id Update User * * @apiVersion 1.0.0 - * @apiPermission Authenticated + * @apiPermission Authenticated ['permissions' => 'list-users', 'roles' => ''] | Resource Owner * - * @apiParam {String} [password] min:6|max:40 - * @apiParam {String} [name] min:2|max:50 - * @apiParam {String="male,female,unspecified"} [gender] - * @apiParam {Date} [birth] format: Y-m-d / e.g. 2015-10-15 + * @apiParam {String} [password] min:6|max:40 + * @apiParam {String} [name] min:2|max:50 + * @apiParam {String="male,female,unspecified"} [gender] + * @apiParam {Date} [birth] format: Y-m-d / e.g. 2015-10-15 * * @apiUse UserSuccessSingleResponse */