Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit ccdd245

Browse files
authored
feat: my tasks shows only tasks assigned to the logged-in user (#120)
- Previously, users with elevated roles as Manager could see all tasks, causing inconsistency and confusion about the purpose of the view. - Now My Tasks always reflects the employee's own assignments, improving clarity and access control.
1 parent 0152b94 commit ccdd245

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/core/src/lib/tasks/task.service.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,13 @@ export class TaskService extends TenantAwareCrudService<Task> {
390390
* @returns
391391
*/
392392
async getMyTasks(options: PaginationParams<Task> & IAdvancedTaskFiltering) {
393-
return await this.getEmployeeTasks(options);
393+
const { where } = options;
394+
395+
const members = {
396+
id: RequestContext.currentUser().employeeId as string
397+
};
398+
399+
return await this.getEmployeeTasks({ ...options, where: { ...where, members } });
394400
}
395401

396402
private addTaskCommonFilters(

0 commit comments

Comments
 (0)