diff --git a/tailbone/api/users.py b/tailbone/api/users.py
index 8ebfedf2..a21d3a2c 100644
--- a/tailbone/api/users.py
+++ b/tailbone/api/users.py
@@ -42,6 +42,7 @@ class UserView(APIMasterView):
def normalize(self, user):
return {
+ 'uuid': user.uuid,
'username': user.username,
'person_display_name': (user.person.display_name or '') if user.person else '',
'active': user.active,
diff --git a/tailbone/templates/users/vue_index.mako b/tailbone/templates/users/vue_index.mako
index 1b871343..e3a4675d 100644
--- a/tailbone/templates/users/vue_index.mako
+++ b/tailbone/templates/users/vue_index.mako
@@ -36,10 +36,29 @@
%def>
+
## TODO: need to make endpoint a bit more configurable somehow
- ## // TODO: why on earth doesn't it render bool as string by default?
+
+ ## TODO: make URLs more flexible / configurable... also perms?
+ % if request.has_perm('users.view'):
+ {{ props.row.username }}
+ {{ props.row.person_display_name }}
+ % endif
+
+ ## TODO: why on earth doesn't it render bool as string by default?
{{ props.row.active }}
+
+ ## TODO: make URLs more flexible / configurable... also perms?
+
+ % if request.has_perm('users.view'):
+ View
+ % endif
+ % if request.has_perm('users.edit'):
+ | Edit
+ % endif
+
+
@@ -79,15 +98,21 @@ Vue.use(VueTables.ServerTable, {
}
}, true, 'bulma', 'default');
+<%
+ columns = [
+ 'username',
+ 'person_display_name',
+ 'active',
+ ]
+ if request.has_any_perm('users.view', 'users.edit'):
+ columns.append('actions')
+%>
+
var app = new Vue({
el: '#vue-app',
store: store,
data: {
- columns: [
- 'username',
- 'person_display_name',
- 'active'
- ],
+ columns: ${json.dumps(columns)|n},
options: {
columnsDropdown: true,
filterable: false,