diff --git a/.gitignore b/.gitignore index 9dd5fe0..a14e2ea 100755 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ backend/mappings.db backend/tasks.db backend/logs +backend/auth.db diff --git a/.kilocode/workflows/read_semantic.md b/.kilocode/workflows/read_semantic.md new file mode 100644 index 0000000..bde31a1 --- /dev/null +++ b/.kilocode/workflows/read_semantic.md @@ -0,0 +1,4 @@ +--- +description: USE SEMANTIC +--- +Прочитай semantic_protocol.md. ОБЯЗАТЕЛЬНО используй его при разработке \ No newline at end of file diff --git a/.specify/memory/constitution.md b/.specify/memory/constitution.md index 069ab61..63156cb 100644 --- a/.specify/memory/constitution.md +++ b/.specify/memory/constitution.md @@ -1,8 +1,8 @@ diff --git a/frontend/src/components/auth/ProtectedRoute.svelte b/frontend/src/components/auth/ProtectedRoute.svelte new file mode 100644 index 0000000..a195689 --- /dev/null +++ b/frontend/src/components/auth/ProtectedRoute.svelte @@ -0,0 +1,61 @@ + + + + + +{#if $auth.loading} +
{$t.admin.roles.loading}
+ {:else if error} +| {$t.admin.roles.name} | +{$t.admin.roles.description} | +{$t.admin.roles.permissions} | +{$t.common.actions} | +
|---|---|---|---|
| {role.name} | +{role.description || '-'} | +
+
+ {#each role.permissions as perm}
+
+ {perm.resource}:{perm.action}
+
+ {/each}
+
+ |
+ + + + | +
{$t.common.loading}
+{$t.common.error}
+{error}
+| {$t.admin.settings.ad_group} | +{$t.admin.settings.local_role} | +
|---|---|
| {mapping.ad_group} | ++ + {roles.find(r => r.id === mapping.role_id)?.name || mapping.role_id} + + | +
|
+
+
+
+ {$t.admin.settings.no_mappings} + |
+ |
{$t.common.loading}
+{$t.common.error}
+{error}
+| {$t.admin.users.username} | +{$t.admin.users.email} | +{$t.admin.users.source} | +{$t.admin.users.roles} | +{$t.admin.users.status} | +{$t.common.actions} | +
|---|---|---|---|---|---|
| {user.username} | +{user.email || '-'} | ++ + {user.auth_source} + + | +
+
+ {#each user.roles as role}
+ {role.name}
+ {/each}
+
+ |
+ + + + + {user.is_active ? $t.admin.users.active : $t.admin.users.inactive} + + + | ++ + + | +