You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/10/22 21:10:41 UTC
[airavata-django-portal] 02/02: AIRAVATA-3226 Allow "activating"
user who is enabled in Keycloak but for some reason doesn't have an
Airavata User Profile
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 4384aaf382f3cb82833fe5485594134db62ebb6e
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Oct 22 17:05:21 2019 -0400
AIRAVATA-3226 Allow "activating" user who is enabled in Keycloak but for some reason doesn't have an Airavata User Profile
---
.../src/components/users/ActivateUserPanel.vue | 27 ++++++++++++++++++++++
.../src/components/users/UserDetailsContainer.vue | 9 +++++++-
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ActivateUserPanel.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ActivateUserPanel.vue
new file mode 100644
index 0000000..40b7385
--- /dev/null
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ActivateUserPanel.vue
@@ -0,0 +1,27 @@
+<template>
+ <b-card header="Activate User">
+ <p class="card-text">
+ User {{ username }} has verified their login, but doesn't yet have an Airavata User Profile. Click <b>Activate</b>
+ to create an Airavata User Profile for this user. This will allow the user to be assigned to groups.
+ </p>
+ <b-button @click="activate">Activate</b-button>
+ </b-card>
+</template>
+
+<script>
+export default {
+ name: "activate-user-panel",
+ props: {
+ username: {
+ type: String,
+ required: true
+ }
+ },
+ methods: {
+ activate() {
+ this.$emit("activate-user", this.username);
+ }
+ }
+};
+</script>
+
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserDetailsContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserDetailsContainer.vue
index 6f6e5a8..9bd2eba 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserDetailsContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserDetailsContainer.vue
@@ -7,6 +7,11 @@
:airavata-internal-user-id="iamUserProfile.airavataInternalUserId"
@input="groupsUpdated"
/>
+ <activate-user-panel
+ v-if="iamUserProfile.enabled && iamUserProfile.emailVerified && !iamUserProfile.airavataUserProfileExists"
+ :username="iamUserProfile.userId"
+ @activate-user="$emit('enable-user', $event)"
+ />
<enable-user-panel
v-if="!iamUserProfile.enabled && !iamUserProfile.emailVerified"
:username="iamUserProfile.userId"
@@ -23,6 +28,7 @@
<script>
import { models } from "django-airavata-api";
import UserGroupMembershipEditor from "./UserGroupMembershipEditor";
+import ActivateUserPanel from "./ActivateUserPanel";
import EnableUserPanel from "./EnableUserPanel";
import DeleteUserPanel from "./DeleteUserPanel";
@@ -41,7 +47,8 @@ export default {
components: {
UserGroupMembershipEditor,
EnableUserPanel,
- DeleteUserPanel
+ DeleteUserPanel,
+ ActivateUserPanel
},
data() {
return {