Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylli committed Mar 7, 2024
1 parent 94d8ceb commit d798954
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Another example [here](https://co-pilot.dev/changelog)
- Restructure seed/index.ts to work with e2e tests, and add --runInBand to e2e scripts[#101](https://github.com/chingu-x/chingu-dashboard-be/pull/101)
- Update changelog ([#104](https://github.com/chingu-x/chingu-dashboard-be/pull/104))
- Update test.yml to run e2e tests on pull requests to the main branch [#105](https://github.com/chingu-x/chingu-dashboard-be/pull/105)
- Add role and permission guard to some existing routes
[#112](https://github.com/chingu-x/chingu-dashboard-be/pull/112)

### Fixed
- Fix failed tests in app and ideation due to the change from jwt token response to http cookies ([#98](https://github.com/chingu-x/chingu-dashboard-be/pull/98))
Expand Down
3 changes: 2 additions & 1 deletion src/auth/guards/permissions.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Reflector } from "@nestjs/core";
import { Observable } from "rxjs";
import { AppPermissions } from "../auth.permissions";
import { PERM_KEY } from "../../global/decorators/permissions.decorator";
import { AppRoles } from "../auth.roles";

@Injectable()
export class PermissionsGuard implements CanActivate {
Expand All @@ -27,7 +28,7 @@ export class PermissionsGuard implements CanActivate {

if (requiredPermissions.includes(AppPermissions.OWN_TEAM)) {
// Admin can bypass this
// if (user.roles.includes(AppRoles.Admin)) return true;
if (user.roles.includes(AppRoles.Admin)) return true;
if (!params.teamId) {
throw new InternalServerErrorException(
"This permission guard requires :teamId param",
Expand Down

0 comments on commit d798954

Please sign in to comment.