Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
ac50bb92
Unverified
Commit
ac50bb92
authored
6 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
Resolve #3137
parent
8fd95de2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.config/example.yml
+4
-0
4 additions, 0 deletions
.config/example.yml
src/config/load.ts
+2
-0
2 additions, 0 deletions
src/config/load.ts
src/config/types.ts
+2
-0
2 additions, 0 deletions
src/config/types.ts
src/server/api/private/signup.ts
+3
-0
3 additions, 0 deletions
src/server/api/private/signup.ts
with
11 additions
and
0 deletions
.config/example.yml
+
4
−
0
View file @
ac50bb92
...
...
@@ -110,6 +110,10 @@ drive:
# accessKey: XXX
# secretKey: YYY
# If enabled:
# The first account created is automatically marked as Admin.
autoAdmin
:
true
#
# Below settings are optional
#
...
...
This diff is collapsed.
Click to expand it.
src/config/load.ts
+
2
−
0
View file @
ac50bb92
...
...
@@ -49,6 +49,8 @@ export default function load() {
if
(
config
.
localDriveCapacityMb
==
null
)
config
.
localDriveCapacityMb
=
256
;
if
(
config
.
remoteDriveCapacityMb
==
null
)
config
.
remoteDriveCapacityMb
=
8
;
if
(
config
.
autoAdmin
==
null
)
config
.
autoAdmin
=
false
;
return
Object
.
assign
(
config
,
mixin
);
}
...
...
This diff is collapsed.
Click to expand it.
src/config/types.ts
+
2
−
0
View file @
ac50bb92
...
...
@@ -58,6 +58,8 @@ export type Source = {
config
?:
any
;
};
autoAdmin
?:
boolean
;
/**
* ゴーストアカウントのID
*/
...
...
This diff is collapsed.
Click to expand it.
src/server/api/private/signup.ts
+
3
−
0
View file @
ac50bb92
...
...
@@ -67,6 +67,8 @@ export default async (ctx: Koa.Context) => {
return
;
}
const
usersCount
=
await
User
.
count
({});
// Fetch exist user that same username
const
usernameExist
=
await
User
.
count
({
...
...
@@ -106,6 +108,7 @@ export default async (ctx: Koa.Context) => {
token
:
secret
,
email
:
null
,
password
:
hash
,
isAdmin
:
config
.
autoAdmin
&&
usersCount
===
0
,
profile
:
{
bio
:
null
,
birthday
:
null
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment