Add traps; user registration
This commit is contained in:
@@ -40,6 +40,14 @@ const auth_routes = {
|
||||
'controller::api:v1:Auth.validate_username'
|
||||
],
|
||||
|
||||
'/validate/user_exists': [
|
||||
'controller::api:v1:Auth.user_exists',
|
||||
],
|
||||
|
||||
'/validate/email': [
|
||||
'controller::api:v1:Auth.validate_email',
|
||||
],
|
||||
|
||||
'/attempt': [
|
||||
'controller::api:v1:Auth.attempt'
|
||||
],
|
||||
@@ -77,6 +85,12 @@ const auth_routes = {
|
||||
['middleware::api:Permission', { check: 'v1:auth:users:create' }],
|
||||
'controller::api:v1:Auth.create_user',
|
||||
],
|
||||
|
||||
'/registration': [
|
||||
['middleware::util:Setting', { key: 'auth.allow_registration' }],
|
||||
'middleware::auth:GuestOnly',
|
||||
'controller::api:v1:Auth.registration',
|
||||
],
|
||||
},
|
||||
|
||||
patch: {
|
||||
|
||||
@@ -24,12 +24,14 @@ const index = {
|
||||
|
||||
get: {
|
||||
'/:provider/register': [
|
||||
['middleware::util:Setting', { key: 'auth.allow_registration' }],
|
||||
'middleware::auth:ProviderRoute',
|
||||
'middleware::auth:GuestOnly',
|
||||
'middleware::auth:ProviderRegistrationEnabled',
|
||||
'controller::auth:Forms.registration_provider_get',
|
||||
],
|
||||
'/register': [
|
||||
['middleware::util:Setting', { key: 'auth.allow_registration' }],
|
||||
'middleware::auth:ProviderRoute',
|
||||
'middleware::auth:GuestOnly',
|
||||
'middleware::auth:ProviderRegistrationEnabled',
|
||||
@@ -67,7 +69,8 @@ const index = {
|
||||
},
|
||||
|
||||
post: {
|
||||
'/:provider/register': [
|
||||
/*'/:provider/register': [
|
||||
['middleware::util:Setting', { key: 'auth.allow_registration' }],
|
||||
'middleware::auth:ProviderRoute',
|
||||
'middleware::auth:GuestOnly',
|
||||
'middleware::auth:ProviderRegistrationEnabled',
|
||||
@@ -75,12 +78,13 @@ const index = {
|
||||
'controller::auth:Forms.registration_provider_present_user_created',
|
||||
],
|
||||
'/register': [
|
||||
['middleware::util:Setting', { key: 'auth.allow_registration' }],
|
||||
'middleware::auth:ProviderRoute',
|
||||
'middleware::auth:GuestOnly',
|
||||
'middleware::auth:ProviderRegistrationEnabled',
|
||||
'controller::auth:Forms.registration_provider_create_user',
|
||||
'controller::auth:Forms.registration_provider_present_user_created',
|
||||
],
|
||||
],*/
|
||||
|
||||
'/:provider/login': [
|
||||
'middleware::auth:ProviderRoute',
|
||||
|
||||
Reference in New Issue
Block a user