Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
SigNoz
Commits
f233bfb9
Commit
f233bfb9
authored
3 years ago
by
Ankit Nayan
Browse files
Options
Download
Email Patches
Plain Diff
chore: change in error message on register
parent
8a7cbc8a
chore/change-validation-message
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pkg/query-service/auth/auth.go
+5
-1
pkg/query-service/auth/auth.go
pkg/query-service/auth/utils.go
+1
-0
pkg/query-service/auth/utils.go
with
6 additions
and
1 deletion
+6
-1
pkg/query-service/auth/auth.go
+
5
-
1
View file @
f233bfb9
...
...
@@ -125,7 +125,11 @@ func validateInvite(ctx context.Context, req *RegisterRequest) (*model.Invitatio
return
nil
,
errors
.
Wrap
(
err
.
Err
,
"Failed to read from DB"
)
}
if
invitation
==
nil
||
invitation
.
Token
!=
req
.
InviteToken
{
if
invitation
==
nil
{
return
nil
,
ErrorAskAdmin
}
if
invitation
.
Token
!=
req
.
InviteToken
{
return
nil
,
ErrorInvalidInviteToken
}
...
...
This diff is collapsed.
Click to expand it.
pkg/query-service/auth/utils.go
+
1
-
0
View file @
f233bfb9
...
...
@@ -15,6 +15,7 @@ var (
ErrorInvalidRole
=
errors
.
New
(
"Invalid role"
)
ErrorInvalidInviteToken
=
errors
.
New
(
"Invalid invite token"
)
ErrorAskAdmin
=
errors
.
New
(
"You are not allowed to create an account. Please ask your admin to send an invite link"
)
)
func
randomHex
(
sz
int
)
(
string
,
error
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help