Skip to content

Commit

Permalink
Disable user registration
Browse files Browse the repository at this point in the history
  • Loading branch information
sarikaya committed Jun 22, 2024
1 parent 49dedf1 commit c4a5968
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions cvat-ui/src/components/cvat-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import TaskPageContainer from 'containers/task-page/task-page';
import ModelsPageContainer from 'containers/models-page/models-page';
import AnnotationPageContainer from 'containers/annotation-page/annotation-page';
import LoginPageContainer from 'containers/login-page/login-page';
import RegisterPageContainer from 'containers/register-page/register-page';
// import RegisterPageContainer from 'containers/register-page/register-page';
import CloudStoragesPageComponent from 'components/cloud-storages-page/cloud-storages-page';
import CreateCloudStoragePageComponent from 'components/create-cloud-storage-page/create-cloud-storage-page';
import UpdateCloudStoragePageComponent from 'components/update-cloud-storage-page/update-cloud-storage-page';
Expand Down Expand Up @@ -99,9 +99,7 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP

verifyAuthorized();

const {
name, version, engine, os,
} = platformInfo();
const { name, version, engine, os } = platformInfo();

if (showPlatformNotification()) {
stopNotifications(false);
Expand Down Expand Up @@ -376,7 +374,7 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP
return (
<GlobalErrorBoundary>
<Switch>
<Route exact path='/auth/register' component={RegisterPageContainer} />
{/*<Route exact path='/auth/register' component={RegisterPageContainer} />*/}
<Route exact path='/auth/login' component={LoginPageContainer} />
<Route
exact
Expand Down
4 changes: 2 additions & 2 deletions cvat-ui/src/components/login-page/login-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ function LoginPageComponent(props: LoginPageComponentProps & RouteComponentProps
onLogin(loginData.username, loginData.password);
}}
/>
<Row justify='start' align='top'>
{/* <Row justify='start' align='top'>
<Col>
<Text strong>
New to CVAT? Create
<Link to='/auth/register'> an account</Link>
</Text>
</Col>
</Row>
</Row> */}
{renderResetPassword && (
<Row justify='start' align='top'>
<Col>
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/authentication/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

if settings.DJANGO_AUTH_TYPE == 'BASIC':
urlpatterns += [
path('register', RegisterView.as_view(), name='rest_register'),
# path('register', RegisterView.as_view(), name='rest_register'),
path('password/reset', PasswordResetView.as_view(),
name='rest_password_reset'),
path('password/reset/confirm', PasswordResetConfirmView.as_view(),
Expand Down
8 changes: 4 additions & 4 deletions cvat/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def add_ssh_keys():
'allauth.account',
'corsheaders',
'allauth.socialaccount',
'rest_auth.registration'
# 'rest_auth.registration'
]

if strtobool(os.environ.get("ADAPTIVE_AUTO_ANNOTATION", 'false')):
Expand Down Expand Up @@ -170,9 +170,9 @@ def add_ssh_keys():
},
}

REST_AUTH_REGISTER_SERIALIZERS = {
'REGISTER_SERIALIZER': 'cvat.apps.restrictions.serializers.RestrictedRegisterSerializer',
}
# REST_AUTH_REGISTER_SERIALIZERS = {
# 'REGISTER_SERIALIZER': 'cvat.apps.restrictions.serializers.RestrictedRegisterSerializer',
# }

REST_AUTH_SERIALIZERS = {
'PASSWORD_RESET_SERIALIZER': 'cvat.apps.authentication.serializers.PasswordResetSerializerEx',
Expand Down

0 comments on commit c4a5968

Please sign in to comment.