Files
yourpart3/backend/utils/initializeUserRights.js
Torsten Schulz (local) 008cd7ae86
All checks were successful
Deploy to production / deploy (push) Successful in 1m52s
feat(Navigation, UserRights, Localization): add worker schedules feature and enhance access control
- Updated navigation structure to include a new section for worker schedules, accessible to specific user roles.
- Introduced a new user right type for 'worker_schedule_read' to manage access permissions effectively.
- Added localization entries for worker schedules in multiple languages, ensuring consistent user experience across the application.
- Created a new route and component for managing worker schedules in the admin panel.
2026-05-08 08:54:17 +02:00

48 lines
1.4 KiB
JavaScript

import UserRightType from "../models/type/user_right.js";
const initializeUserRights = async() => {
await UserRightType.findOrCreate({
where: { title: "mainadmin"},
defaults: { title: "mainadmin"}
});
await UserRightType.findOrCreate({
where: { title: "contactrequests"},
defaults: { title: "contactrequests"}
});
await UserRightType.findOrCreate({
where: { title: "useradministration"},
defaults: { title: "useradministration"}
});
await UserRightType.findOrCreate({
where: { title: "forum"},
defaults: { title: "forum"}
});
await UserRightType.findOrCreate({
where: { title: "rights"},
defaults: { title: "rights"}
});
await UserRightType.findOrCreate({
where: { title: "interests"},
defaults: { title: "interests"}
});
await UserRightType.findOrCreate({
where: { title: "falukant"},
defaults: { title: "falukant"}
});
await UserRightType.findOrCreate({
where: { title: "developer"},
defaults: { title: "developer"}
});
await UserRightType.findOrCreate({
where: { title: "match3"},
defaults: { title: "match3"}
});
await UserRightType.findOrCreate({
where: { title: "worker_schedule_read"},
defaults: { title: "worker_schedule_read"}
});
};
export default initializeUserRights;