mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
feat: move snippets backend and tables into a plugin (B2)
This commit is contained in:
1 parent
fdedca39fd
commit
e07221eaf3
51 files changed
+28426
-3553
No files matched your search
@@ -75,7 +75,7 @@ const ADMIN_TARGET_USER_HEADER = "x-admin-target-user";
|
||||
const IMPERSONATION_PATH_ALLOWLIST = [
|
||||
/^\/host\/db\//,
|
||||
/^\/credentials(\/|$)/,
|
||||
/^\/snippets(\/|$)/,
|
||||
/^\/plugin-api\/snippets(\/|$)/,
|
||||
];
|
||||
|
||||
class AuthManager {
|
||||
|
||||
@@ -34,17 +34,6 @@ export const PERMISSION_CATALOG: PermissionCatalogEntry[] = [
|
||||
"hosts.share",
|
||||
],
|
||||
},
|
||||
{
|
||||
group: "snippets",
|
||||
labelKey: "admin.rolePermissions.groups.snippets",
|
||||
permissions: [
|
||||
"snippets.view",
|
||||
"snippets.create",
|
||||
"snippets.edit",
|
||||
"snippets.delete",
|
||||
"snippets.share",
|
||||
],
|
||||
},
|
||||
{
|
||||
group: "credentials",
|
||||
labelKey: "admin.rolePermissions.groups.credentials",
|
||||
@@ -183,6 +172,6 @@ export const SYSTEM_ROLE_DEFAULTS = {
|
||||
},
|
||||
user: {
|
||||
description: "Regular user",
|
||||
permissions: ["hosts.*", "snippets.*", "credentials.*"],
|
||||
permissions: ["hosts.*", "credentials.*"],
|
||||
},
|
||||
} as const;
|
||||
Reference in new issue
Block a user