diff --git a/admin/src/App.vue b/admin/src/App.vue
index c511ffa..e2acd35 100644
--- a/admin/src/App.vue
+++ b/admin/src/App.vue
@@ -16,7 +16,15 @@
{{ currentUser?.role === 'admin' ? '👑' : '👤' }}
-
{{ currentUser?.name }}
+
+ {{ currentUser?.name }}
+
+ Limited Access ({{ currentUser.allowedAgents.length }} agents)
+
+
+ Full Access
+
+
@@ -148,6 +156,18 @@ export default {
border-radius: 6px;
}
+.user-details {
+ display: flex;
+ flex-direction: column;
+ gap: 0.1rem;
+}
+
+.user-access-info {
+ font-size: 0.6rem;
+ opacity: 0.8;
+ font-weight: 400;
+}
+
.user-avatar {
font-size: 0.8rem;
width: 1.5rem;
diff --git a/admin/src/pages/Admin.vue b/admin/src/pages/Admin.vue
index 171b013..6044a70 100644
--- a/admin/src/pages/Admin.vue
+++ b/admin/src/pages/Admin.vue
@@ -63,9 +63,17 @@
{{ user.name }} |
{{ user.email }} |
-
- {{ (user.preferences?.role || 'user').toUpperCase() }}
-
+
+
+ {{ (user.preferences?.role || 'user').toUpperCase() }}
+
+
+ Limited ({{ user.preferences.allowedAgents.length }} agents)
+
+
+ Full Access
+
+
|
@@ -1660,6 +1668,31 @@ export default {
color: #991b1b;
}
+/* User Role and Access Indicators */
+.user-role-info {
+ display: flex;
+ flex-direction: column;
+ gap: 0.25rem;
+}
+
+.access-badge {
+ padding: 0.15rem 0.4rem;
+ border-radius: 10px;
+ font-size: 0.6rem;
+ font-weight: 500;
+ text-align: center;
+}
+
+.access-badge.full {
+ background: #d1fae5;
+ color: #065f46;
+}
+
+.access-badge.restricted {
+ background: #fef3c7;
+ color: #92400e;
+}
+
.agents-table {
background: white;
border-radius: 8px;
diff --git a/admin/src/services/api.js b/admin/src/services/api.js
index 60ea27f..fb8b89e 100644
--- a/admin/src/services/api.js
+++ b/admin/src/services/api.js
@@ -18,6 +18,16 @@ api.interceptors.response.use(
export const agentsAPI = {
async getAll(admin = false) {
const params = admin ? { admin: 'true' } : {};
+
+ // Add userId for permission filtering (unless admin request)
+ if (!admin) {
+ const currentUser = localStorage.getItem('currentUser');
+ if (currentUser) {
+ const user = JSON.parse(currentUser);
+ params.userId = user.id;
+ }
+ }
+
const response = await api.get('/assistants', { params })
return response.data
},
|