docs: fix regex EDITOR_ALLOWED nel piano (bypass prefisso)
This commit is contained in:
@@ -177,7 +177,7 @@ export function createUser(db: Database.Database, username: string, password: st
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Percorsi admin consentiti anche al ruolo editor.
|
// Percorsi admin consentiti anche al ruolo editor.
|
||||||
const EDITOR_ALLOWED = [/^\/admin\/content(\/|$)?/, /^\/api\/admin\/content(\/|$)/, /^\/admin\/logout$/];
|
const EDITOR_ALLOWED = [/^\/admin\/content(\/|$)/, /^\/api\/admin\/content(\/|$)/, /^\/admin\/logout$/];
|
||||||
|
|
||||||
export function canAccessAdminPath(role: string, pathname: string): boolean {
|
export function canAccessAdminPath(role: string, pathname: string): boolean {
|
||||||
if (role === 'admin') return true;
|
if (role === 'admin') return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user