Skip to content

Commit

Permalink
Update UserExtensions.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhollmann committed May 21, 2024
1 parent 35d271c commit 7947334
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/src/models/extensions/UserExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ async function getCoursesWithInformation(this: User): Promise<Course[]> {
* Checks if the user is a mentor (i.e. is a member of any mentor group)
*/
async function isMentor(this: User): Promise<boolean> {
const mentorGroups = await this.getMentorGroups();
return mentorGroups.length > 0;
return this.hasPermission('mentor.view');
}

export default {
Expand Down

0 comments on commit 7947334

Please sign in to comment.