This repository has been archived by the owner on Oct 20, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: User creation from management gui / management API
This closes gravitee-io/issues#1505
- Loading branch information
Showing
14 changed files
with
135 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# User creation | ||
|
||
Fill user information and validate. The new user will receive an email to finalize the creation by setting a password. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/management/configuration/user/new/new-user.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import UserService from '../../../../services/user.service'; | ||
import NotificationService from '../../../../services/notification.service'; | ||
import { StateService } from '@uirouter/core'; | ||
|
||
const NewUserComponent: ng.IComponentOptions = { | ||
template: require('./new-user.html'), | ||
controller: function ( | ||
UserService: UserService, | ||
NotificationService: NotificationService, | ||
$state: StateService | ||
) { | ||
'ngInject'; | ||
this.create = () => { | ||
UserService.create(this.user).then(() => { | ||
NotificationService.show('User registered with success'); | ||
$state.go('management.settings.users'); | ||
}); | ||
}; | ||
} | ||
}; | ||
|
||
export default NewUserComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- | ||
Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<div class="gv-forms" layout="column"> | ||
<div layout="row" layout-align="start end" class="gv-forms-header"> | ||
<h1 class="user"> | ||
Create a user | ||
<a ui-sref="management.settings.users" style="font-size: 12px; font-weight: normal;">Back to users</a> | ||
</h1> | ||
</div> | ||
|
||
<div class="gv-form"> | ||
<form name="$ctrl.formCreation" ng-submit="$ctrl.create($)" layout="column"> | ||
<md-input-container class="md-icon-float"> | ||
<label>First name</label> | ||
<input ng-model="$ctrl.user.firstname" type="text" required autofocus> | ||
</md-input-container> | ||
|
||
<md-input-container class="md-icon-float"> | ||
<label>Last name</label> | ||
<input ng-model="$ctrl.user.lastname" type="text" required> | ||
</md-input-container> | ||
|
||
<md-input-container class="md-icon-float"> | ||
<label>Email</label> | ||
<input ng-model="$ctrl.user.email" type="email" required> | ||
</md-input-container> | ||
|
||
<div class="md-actions" layout="row"> | ||
<md-button type="submit" class="md-raised md-primary" ng-disabled="$ctrl.formCreation.$invalid || $ctrl.formCreation.$pristine"> | ||
Save | ||
</md-button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters