summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hofmaier2018-08-07 08:56:58 +0200
committerChristian Hofmaier2018-08-07 08:56:58 +0200
commit14635c696d7df5b4ccb2c423157b6fb917cb869b (patch)
tree1335a608f24226be4edc946cf491ca8155fbe3df
parent[groups] add ability to show all nested children and not just direkt children... (diff)
downloadbas-14635c696d7df5b4ccb2c423157b6fb917cb869b.tar.gz
bas-14635c696d7df5b4ccb2c423157b6fb917cb869b.tar.xz
bas-14635c696d7df5b4ccb2c423157b6fb917cb869b.zip
Roles of Users now in fancy boxes and other small ui polishing
-rw-r--r--server/api/groups.js2
-rw-r--r--server/lib/permissions/index.js4
-rw-r--r--webapp/src/components/PermissionModuleEdit.vue8
-rw-r--r--webapp/src/components/PermissionModuleGrantRevoke.vue2
-rw-r--r--webapp/src/components/PermissionModuleRoleList.vue2
-rw-r--r--webapp/src/components/PermissionModuleUserList.vue14
6 files changed, 17 insertions, 15 deletions
diff --git a/server/api/groups.js b/server/api/groups.js
index e8efd4f..0ea45fb 100644
--- a/server/api/groups.js
+++ b/server/api/groups.js
@@ -27,7 +27,7 @@ function includeAllChilds (group, groupIdChain = []) {
module.exports.get = {
// get a list containing id and name of all groups
getList: function (req, res) {
- db.group.findAll({ attributes: ['id', 'name'], order: [['name', 'ASC']] }).then(list => {
+ db.group.findAll({ attributes: ['id', 'name', 'description'], order: [['name', 'ASC']] }).then(list => {
res.send(list)
})
},
diff --git a/server/lib/permissions/index.js b/server/lib/permissions/index.js
index 12db24f..6eb079f 100644
--- a/server/lib/permissions/index.js
+++ b/server/lib/permissions/index.js
@@ -5,7 +5,7 @@ var db = require(path.join(__appdir, 'lib', 'sequelize'))
updatePermissionDatabase()
- /*
+/*
* Update the permission-Database accordingly to the permission.json
*/
function updatePermissionDatabase () {
@@ -23,7 +23,7 @@ function updatePermissionDatabase () {
)
}
- /*
+/*
* model: <DB_MODEL>
* newItem: <DB_OBJECT>
* where: <DB_WHERECLAUSE>
diff --git a/webapp/src/components/PermissionModuleEdit.vue b/webapp/src/components/PermissionModuleEdit.vue
index f94f483..e1cf45f 100644
--- a/webapp/src/components/PermissionModuleEdit.vue
+++ b/webapp/src/components/PermissionModuleEdit.vue
@@ -37,7 +37,7 @@
scrollable
>
<v-card>
- <v-card-title style="padding: 0px">
+ <v-card-title class="dialog-title">
<v-stepper v-model="step" horizontal style="width: 100%; background: transparent;" class="elevation-3">
<v-stepper-header>
<v-stepper-step
@@ -318,7 +318,7 @@ export default {
this.groupsSelected = value
},
loadGroups () {
- this.$http('/api/groups/getAll').then(response => {
+ this.$http('/api/groups/getList').then(response => {
this.groups = response.data
})
},
@@ -365,4 +365,8 @@ export default {
.list-header-margin {
margin-bottom: 10px;
}
+.dialog-title {
+ padding: 0px;
+ z-index: 1;
+}
</style>
diff --git a/webapp/src/components/PermissionModuleGrantRevoke.vue b/webapp/src/components/PermissionModuleGrantRevoke.vue
index 876daca..06868d5 100644
--- a/webapp/src/components/PermissionModuleGrantRevoke.vue
+++ b/webapp/src/components/PermissionModuleGrantRevoke.vue
@@ -153,7 +153,7 @@ export default {
roleHeaders: [
{ text: this.$t('id'), value: 'id' },
{ text: this.$t('name'), value: 'name' },
- { text: this.$t('description'), value: 'descr' },
+ { text: this.$t('description'), value: 'descr' }
]
}
},
diff --git a/webapp/src/components/PermissionModuleRoleList.vue b/webapp/src/components/PermissionModuleRoleList.vue
index 050e394..067f161 100644
--- a/webapp/src/components/PermissionModuleRoleList.vue
+++ b/webapp/src/components/PermissionModuleRoleList.vue
@@ -54,7 +54,7 @@
</v-data-table>
</v-card>
<div class="text-xs-right">
- <v-btn color="error" flat @click="$store.commit('permissions/setDialog', true )">
+ <v-btn color="error" flat @click="$store.commit('permissions/setDialog', true )" :disabled="selectedRoles.length === 0">
<v-icon left>remove_circle_outline</v-icon>{{ $tc('delete-role', selectedRoles.length, [selectedRoles.length]) }}
</v-btn>
<v-btn color="success" flat @click="$store.commit('permissions/editRole', 0)">
diff --git a/webapp/src/components/PermissionModuleUserList.vue b/webapp/src/components/PermissionModuleUserList.vue
index f093680..1a28304 100644
--- a/webapp/src/components/PermissionModuleUserList.vue
+++ b/webapp/src/components/PermissionModuleUserList.vue
@@ -44,12 +44,10 @@
<td>{{ props.item.name }}</td>
<td>
<template v-for="role in props.item.roles">
- <v-btn
- small
- outline
- flat>
- {{ role.name }}
- </v-btn>
+ <v-tooltip bottom :key="role.id">
+ <v-chip small slot="activator">{{ role.name }}</v-chip>
+ <span>{{ role.descr }}</span>
+ </v-tooltip>
</template>
</td>
</tr>
@@ -57,10 +55,10 @@
</v-data-table>
</v-card>
<div class="text-xs-right">
- <v-btn color="error" flat @click="$store.commit('permissions/grantRevoke', { show: true, grant: false } )">
+ <v-btn color="error" flat @click="$store.commit('permissions/grantRevoke', { show: true, grant: false } )" :disabled="selectedUsers.length === 0">
<v-icon left>remove_circle_outline</v-icon>{{ $t('revoke-role') }}
</v-btn>
- <v-btn color="success" flat @click="$store.commit('permissions/grantRevoke', { show: true, grant: true } )">
+ <v-btn color="success" flat @click="$store.commit('permissions/grantRevoke', { show: true, grant: true } )" :disabled="selectedUsers.length === 0">
<v-icon left>add_circle_outline</v-icon>{{ $t('grant-role') }}
</v-btn>
</div>