mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(invite): trying to get username to work as well
This commit is contained in:
parent
6d6af09296
commit
5a160f426e
@ -134,6 +134,9 @@ func CompleteInvite(c *middleware.Context, completeInvite dtos.CompleteInviteFor
|
||||
}
|
||||
|
||||
invite := query.Result
|
||||
if invite.Status != m.TmpUserInvitePending {
|
||||
return ApiError(412, fmt.Sprintf("Invite cannot be used in status %s", invite.Status), nil)
|
||||
}
|
||||
|
||||
cmd := m.CreateUserCommand{
|
||||
Email: completeInvite.Email,
|
||||
@ -164,6 +167,7 @@ func CompleteInvite(c *middleware.Context, completeInvite dtos.CompleteInviteFor
|
||||
loginUserWithUser(&user, c)
|
||||
|
||||
metrics.M_Api_User_SignUp.Inc(1)
|
||||
metrics.M_Api_User_SignUpInvite.Inc(1)
|
||||
|
||||
return ApiSuccess("User created and logged in")
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ var (
|
||||
M_Api_Status_404 = NewComboCounterRef("api.status.404")
|
||||
|
||||
M_Api_User_SignUp = NewComboCounterRef("api.user.signup")
|
||||
M_Api_User_SignUpInvite = NewComboCounterRef("api.user.signup_invite")
|
||||
M_Api_Dashboard_Get = NewComboCounterRef("api.dashboard.get")
|
||||
M_Api_Dashboard_Post = NewComboCounterRef("api.dashboard.post")
|
||||
M_Api_Admin_User_Create = NewComboCounterRef("api.admin.user_create")
|
||||
|
@ -5,11 +5,11 @@
|
||||
</a>
|
||||
|
||||
<h3>
|
||||
Invite Users
|
||||
Add or Invite Users
|
||||
</h3>
|
||||
|
||||
<div class="modal-tagline">
|
||||
Invite new or existing Grafana users to the organization
|
||||
Invite new or add existing Grafana users to the organization
|
||||
<span class="highlight-word">{{contextSrv.user.orgName}}</span>
|
||||
</div>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="tight-form" ng-repeat="invite in invites">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item">
|
||||
Email
|
||||
Email or Username
|
||||
</li>
|
||||
<li>
|
||||
<input type="email" ng-model="invite.email" required
|
||||
|
@ -10,7 +10,8 @@
|
||||
<h2>Organization users</h2>
|
||||
|
||||
<button class="btn btn-success pull-right" ng-click="openInviteModal()">
|
||||
Invite Users
|
||||
<i class="fa fa-plus"></i>
|
||||
Add or Invite
|
||||
</button>
|
||||
|
||||
<br>
|
||||
|
@ -102,7 +102,7 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-image: url(/img/background_tease.jpg);
|
||||
opacity: 0.15;
|
||||
opacity: 0.05;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user