Ir al contenido

Cambiar los nombres de rol por defecto

Por defecto, la aplicación incluye dos roles de conexión llamados “ROLE_USER” y “ROLE_ADMIN”. Cualquier usuario de OpenKM debe tener asignado uno de estos roles para iniciar sesión.

default.user.role=NEW_ROLE_USER_NAME
default.admin.role=NEW_ROLE_ADMIN_NAME

Actualizar los roles por defecto a los nuevos nombres en la base de datos

Sección titulada «Actualizar los roles por defecto a los nuevos nombres en la base de datos»
-- Update security table
UPDATE OKM_NODE_ROLE_PERMISSION SET NRP_ROLE='NEW_ROLE_USER_NAME' WHERE NRP_ROLE='ROLE_USER';
UPDATE OKM_NODE_ROLE_PERMISSION SET NRP_ROLE='NEW_ROLE_ADMIN_NAME' WHERE NRP_ROLE='ROLE_ADMIN';
-- Insert new roles
INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES ('NEW_ROLE_USER_NAME', 'T');
INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES ('NEW_ROLE_ADMIN_NAME', 'T');
-- Update user roles
UPDATE OKM_USER_ROLE SET UR_ROLE='NEW_ROLE_USER_NAME' WHERE UR_ROLE='ROLE_USER';
UPDATE OKM_USER_ROLE SET UR_ROLE='NEW_ROLE_ADMIN_NAME' WHERE UR_ROLE='ROLE_ADMIN';
-- Remove older roles
DELETE FROM OKM_ROLE WHERE ROL_ID IN ('ROLE_USER', 'ROLE_ADMIN');
  • Reinicie el servicio de OpenKM
  • Vaya a Administration > Tools > Lucene indexes > Rebuild indexes