Skip to content

Commit

Permalink
gem:26673 fix also user with role LessonTeacher use portal
Browse files Browse the repository at this point in the history
  • Loading branch information
schefbi committed Oct 20, 2023
1 parent 428311b commit 817e5be
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
7 changes: 5 additions & 2 deletions cypress/e2e/navigationMenu.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,12 @@ describe("Navigation Menu", () => {
});
});

describe("with 'TeacherRole' role", () => {
describe("with 'TeacherRole' and 'LessonTeacherRole' role", () => {
beforeEach(() => {
cy.login({ roles: ["TeacherRole"], permissions: [] });
cy.login({
roles: ["TeacherRole", "LessonTeacherRole"],
permissions: [],
});
cy.resizeToMobile();
cy.visit("/index.html");
});
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"lint:ts": "tsc --noEmit",
"lint": "npm run lint:eslint && npm run lint:ts",
"cy:run": "cypress run --browser chromium",
"cy:firefox": "cypress run --browser firefox",
"cy:open": "cypress open",
"locale:extract": "lit-localize extract",
"locale:build": "lit-localize build",
Expand Down
11 changes: 9 additions & 2 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export const settings: Settings = {
label: msg("Präsenzkontrolle"),
allowedRolesOrPermissions: [
"TeacherRole",
"LessonTeacherRole",
"AbsenceAdministratorRole",
],
deniedInstanceIds: null,
Expand All @@ -213,6 +214,7 @@ export const settings: Settings = {
label: msg("Aktuelle Fächer"),
allowedRolesOrPermissions: [
"TeacherRole",
"LessonTeacherRole",
"ClassTeacherRole",
"AbsenceAdministratorRole",
],
Expand All @@ -225,6 +227,7 @@ export const settings: Settings = {
label: msg("Tests und Bewertung"),
allowedRolesOrPermissions: [
"TeacherRole",
"LessonTeacherRole",
"AbsenceAdministratorRole",
],
deniedInstanceIds: null,
Expand All @@ -234,15 +237,15 @@ export const settings: Settings = {
{
key: "substitutionsAssign",
label: msg("Stellvertretung erfassen"),
allowedRolesOrPermissions: ["TeacherRole"],
allowedRolesOrPermissions: ["TeacherRole", "LessonTeacherRole"],
deniedInstanceIds: null,
appKey: "stellvertretung",
appPath: "#/substitutions/assign",
},
{
key: "substitutionsExecute",
label: msg("Stellvertretung ausüben"),
allowedRolesOrPermissions: ["TeacherRole"],
allowedRolesOrPermissions: ["TeacherRole", "LessonTeacherRole"],
deniedInstanceIds: null,
appKey: "stellvertretung",
appPath: "#/substitutions/execute",
Expand All @@ -257,6 +260,7 @@ export const settings: Settings = {
label: msg("Offene Absenzen entschuldigen"),
allowedRolesOrPermissions: [
"TeacherRole",
"LessonTeacherRole",
"ClassTeacherRole",
"AbsenceAdministratorRole",
],
Expand All @@ -269,6 +273,7 @@ export const settings: Settings = {
label: msg("Absenzen bearbeiten"),
allowedRolesOrPermissions: [
"TeacherRole",
"LessonTeacherRole",
"ClassTeacherRole",
"AbsenceAdministratorRole",
],
Expand All @@ -281,6 +286,7 @@ export const settings: Settings = {
label: msg("Absenzen auswerten"),
allowedRolesOrPermissions: [
"TeacherRole",
"LessonTeacherRole",
"ClassTeacherRole",
"AbsenceAdministratorRole",
],
Expand Down Expand Up @@ -327,6 +333,7 @@ export const settings: Settings = {
label: msg("Schulinterne Weiterbildung"),
allowedRolesOrPermissions: [
"TeacherRole",
"LessonTeacherRole",
"ClassTeacherRole",
"AbsenceAdministratorRole",
"SubstituteAdministratorRole",
Expand Down

0 comments on commit 817e5be

Please sign in to comment.