Security Roles doesn't work when using Custom API Service

I disabled all permission for NotAuthenticatedUser

And it works when I register new user using User Service API

But it doesnt work when using custom API service which called Register User Service API


Does security role only works in system API services?

To disable user registration from business logic, you need to deny permissions for the ServerCodeUser role.

I see. It works now. Thanks, @mark-piller!