Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[N21-2242] Vue Client: course sync add handling for substitute teachers #3459

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export default {
"common.roleName.student": "Schüler:in",
"common.roleName.superhero": "Schul-Cloud Admin",
"common.roleName.teacher": "Lehrkraft",
"common.roleName.groupSubstitutionTeacher": "Vertretungslehrkraft",
"common.tool.information.incomplete.outdated.schoolAndContext.teacher":
"Konfiguration des Tools {toolName} nicht aktuell oder unvollständig. Bitte Einstellungen überprüfen und an Schuladministrator:in wenden.",
"common.tool.information.outdated.student":
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export default {
"common.roleName.student": "Student",
"common.roleName.superhero": "Schul-Cloud Admin",
"common.roleName.teacher": "Teacher",
"common.roleName.groupSubstitutionTeacher": "Substitute Teacher",
"common.tool.information.incomplete.outdated.schoolAndContext.teacher":
"Configuration of the tool {toolName} is not up to date or incomplete. Please check settings.",
"common.tool.information.outdated.student":
Expand Down
1 change: 1 addition & 0 deletions src/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default {
"common.roleName.student": "Estudiante",
"common.roleName.superhero": "Administrador de Schul-Cloud",
"common.roleName.teacher": "Profesor",
"common.roleName.groupSubstitutionTeacher": "Profesor suplente",
"common.tool.information.incomplete.outdated.schoolAndContext.teacher":
"La configuración de la herramienta {toolName} no está actualizada o está incompleta. Por favor verifique la configuración.",
"common.tool.information.outdated.student":
Expand Down
1 change: 1 addition & 0 deletions src/locales/uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export default {
"common.roleName.student": "Учень",
"common.roleName.superhero": "Адміністратор Schul-Cloud",
"common.roleName.teacher": "Викладач",
"common.roleName.groupSubstitutionTeacher": "Викладач на заміну",
"common.tool.information.incomplete.outdated.schoolAndContext.teacher":
"Конфігурація інструмента {toolName} неоновлена або неповна. Перевірте налаштування.",
"common.tool.information.outdated.student":
Expand Down
3 changes: 3 additions & 0 deletions src/modules/data/group/GroupMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const GroupUserRoleMapping: Partial<Record<RoleName, GroupUserRole>> = {
[RoleName.Administrator]: GroupUserRole.Administrator,
[RoleName.Student]: GroupUserRole.Student,
[RoleName.Teacher]: GroupUserRole.Teacher,
[RoleName.GroupSubstitutionTeacher]: GroupUserRole.GroupSubstituteTeacher,
sdinkov marked this conversation as resolved.
Show resolved Hide resolved
};

export const GroupUserRoleNameTranslationMapping: Record<
Expand All @@ -26,6 +27,8 @@ export const GroupUserRoleNameTranslationMapping: Record<
[GroupUserRole.Administrator]: "common.roleName.administrator",
[GroupUserRole.Student]: "common.roleName.student",
[GroupUserRole.Teacher]: "common.roleName.teacher",
[GroupUserRole.GroupSubstituteTeacher]:
"common.roleName.groupSubstitutionTeacher",
[GroupUserRole.Unknown]: "common.labels.unknown",
};

Expand Down
1 change: 1 addition & 0 deletions src/modules/data/group/types/groupUserRole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export enum GroupUserRole {
Administrator = "administrator",
Student = "student",
Teacher = "teacher",
GroupSubstituteTeacher = "groupSubstitutionTeacher",
Unknown = "unknown",
}
93 changes: 93 additions & 0 deletions src/serverApi/v3/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6366,6 +6366,19 @@ export interface OidcContextResponse {
*/
ui_locales: Array<string>;
}
/**
*
* @export
* @interface OidcLogoutBodyParams
*/
export interface OidcLogoutBodyParams {
/**
*
* @type {string}
* @memberof OidcLogoutBodyParams
*/
logout_token: string;
}
/**
*
* @export
Expand Down Expand Up @@ -6872,6 +6885,7 @@ export enum RoleName {
CourseAdministrator = 'courseAdministrator',
CourseStudent = 'courseStudent',
CourseSubstitutionTeacher = 'courseSubstitutionTeacher',
GroupSubstitutionTeacher = 'groupSubstitutionTeacher',
CourseTeacher = 'courseTeacher',
Demo = 'demo',
DemoStudent = 'demoStudent',
Expand Down Expand Up @@ -10952,6 +10966,42 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Logs out a user for a given logout token from an external oidc system.
* @param {OidcLogoutBodyParams} oidcLogoutBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
logoutControllerLogoutOidc: async (oidcLogoutBodyParams: OidcLogoutBodyParams, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'oidcLogoutBodyParams' is not null or undefined
assertParamExists('logoutControllerLogoutOidc', 'oidcLogoutBodyParams', oidcLogoutBodyParams)
const localVarPath = `/logout/oidc`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;



localVarHeaderParameter['Content-Type'] = 'application/json';

setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(oidcLogoutBodyParams, localVarRequestOptions, configuration)

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
Expand Down Expand Up @@ -11020,6 +11070,17 @@ export const AuthenticationApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutControllerLogout(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Logs out a user for a given logout token from an external oidc system.
* @param {OidcLogoutBodyParams} oidcLogoutBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async logoutControllerLogoutOidc(oidcLogoutBodyParams: OidcLogoutBodyParams, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutControllerLogoutOidc(oidcLogoutBodyParams, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};

Expand Down Expand Up @@ -11078,6 +11139,16 @@ export const AuthenticationApiFactory = function (configuration?: Configuration,
logoutControllerLogout(options?: any): AxiosPromise<void> {
return localVarFp.logoutControllerLogout(options).then((request) => request(axios, basePath));
},
/**
*
* @summary Logs out a user for a given logout token from an external oidc system.
* @param {OidcLogoutBodyParams} oidcLogoutBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
logoutControllerLogoutOidc(oidcLogoutBodyParams: OidcLogoutBodyParams, options?: any): AxiosPromise<void> {
return localVarFp.logoutControllerLogoutOidc(oidcLogoutBodyParams, options).then((request) => request(axios, basePath));
},
};
};

Expand Down Expand Up @@ -11135,6 +11206,16 @@ export interface AuthenticationApiInterface {
*/
logoutControllerLogout(options?: any): AxiosPromise<void>;

/**
*
* @summary Logs out a user for a given logout token from an external oidc system.
* @param {OidcLogoutBodyParams} oidcLogoutBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AuthenticationApiInterface
*/
logoutControllerLogoutOidc(oidcLogoutBodyParams: OidcLogoutBodyParams, options?: any): AxiosPromise<void>;

}

/**
Expand Down Expand Up @@ -11201,6 +11282,18 @@ export class AuthenticationApi extends BaseAPI implements AuthenticationApiInter
public logoutControllerLogout(options?: any) {
return AuthenticationApiFp(this.configuration).logoutControllerLogout(options).then((request) => request(this.axios, this.basePath));
}

/**
*
* @summary Logs out a user for a given logout token from an external oidc system.
* @param {OidcLogoutBodyParams} oidcLogoutBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AuthenticationApi
*/
public logoutControllerLogoutOidc(oidcLogoutBodyParams: OidcLogoutBodyParams, options?: any) {
return AuthenticationApiFp(this.configuration).logoutControllerLogoutOidc(oidcLogoutBodyParams, options).then((request) => request(this.axios, this.basePath));
}
}


Expand Down
Loading