mirror of
https://github.com/hanzoai/chat.git
synced 2026-09-30 20:51:17 +00:00
librechat-data-provider → @hanzochat/data-provider @librechat/data-schemas → @hanzochat/data-schemas @librechat/client → @hanzochat/client (@hanzochat/api already forked; external @librechat/agents fork follows) All imports, package.json names/deps, tsconfig path aliases, jest moduleNameMapper, and rollup/vite build aliases updated. The data-provider react-query subpath resolves via the exports map. Lockfiles regenerated in a follow-on once the canonical package manager is confirmed.
25 lines
691 B
JavaScript
25 lines
691 B
JavaScript
const { logger } = require('@hanzochat/data-schemas');
|
|
const { updateInterfacePermissions: updateInterfacePerms } = require('@hanzochat/api');
|
|
const { getRoleByName, updateAccessPermissions } = require('./Role');
|
|
|
|
/**
|
|
* Update interface permissions based on app configuration.
|
|
* Must be done independently from loading the app config.
|
|
* @param {AppConfig} appConfig
|
|
*/
|
|
async function updateInterfacePermissions(appConfig) {
|
|
try {
|
|
await updateInterfacePerms({
|
|
appConfig,
|
|
getRoleByName,
|
|
updateAccessPermissions,
|
|
});
|
|
} catch (error) {
|
|
logger.error('Error updating interface permissions:', error);
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
updateInterfacePermissions,
|
|
};
|